인프런 커뮤니티 질문&답변
냅색 알고리즘 식
작성
·
212
0
식이
v[j] = max(v[j] //기존의 값 ,
(j/weight)*value +v[j%weight]);
이건 안되는 건가요?
j/weight* value 로 weight가 몇개까지 들어갈수 있는지 확인하고 남은값을 v[j%weight]로 했는데 답이 틀리게 나와서
질문드립니다
퀴즈
58%나 틀려요. 한번 도전해보세요!
C++에서 입출력(cin, cout) 속도를 향상시키기 위해 주로 사용하는 두 가지 코드는 무엇일까요?
`std::ios_base::sync_with_stdio(true);`와 `std::cin.tie(nullptr);`
`std::ios_base::sync_with_stdio(false);`와 `std::cin.tie(nullptr);`
`std::sync_stdio(false);`와 `std::cout.sync(nullptr);`
`std::cin.speed_up();`와 `std::cout.speed_up();`





