제출 #1099893

#제출 시각아이디문제언어결과실행 시간메모리
1099893model_code스핑크스 (IOI24_sphinx)C++17
24 / 100
59 ms868 KiB
// correct/GA_subtask4.cpp #include "sphinx.h" using namespace std; std::vector<int> find_colours(int N, std::vector<int> X, std::vector<int> Y) { vector<int> res(N); int M = X.size(); for (int i = 0; i < N; i++) { int l = 0; int u = N; while (l + 1 < u) { vector<int> v(N, l); v[i] = -1; int m = (l + u) / 2; for (int k = 0; k < m - l; k++) { v[k + (k >= i)] = l + k; } int n = perform_experiment(v); (n == m - l ? u : l) = m; } res[i] = l; } return res; }

컴파일 시 표준 에러 (stderr) 메시지

sphinx.cpp: In function 'std::vector<int> find_colours(int, std::vector<int>, std::vector<int>)':
sphinx.cpp:9:7: warning: unused variable 'M' [-Wunused-variable]
    9 |   int M = X.size();
      |       ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...