랜선 자르기

    [실2] 1654 - 랜선 자르기

    #include #include #include using namespace std; #pragma region 입출력 속도향상 #define FAST_IO() \ {\ ios::sync_with_stdio(false);\ cin.tie(NULL); \ cout.tie(NULL); \ }\ #pragma endregion vector v; int main() { FAST_IO(); long k, n; cin >> k >> n; v.resize(k); for (int i = 0; i > v[i]; sort(v.begin(), v.end()); long l = 1, r = v[k - 1]; long res = 0; while (l = n) { res = mid; l = mid + ..