Submission #1099893

#TimeUsernameProblemLanguageResultExecution timeMemory
1099893model_codeSphinx's Riddle (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; }

Compilation message (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...