Submission #944990

#TimeUsernameProblemLanguageResultExecution timeMemory
944990AccountNameChameleon's Love (JOI20_chameleon)C++14
0 / 100
14 ms596 KiB
#include "chameleon.h" //#include <vector> #include <bits/stdc++.h> using namespace std; namespace { int variable_example = 1; } // namespace void Solve(int N) { bool found[1005]; for (int i = 0; i < 1005; i++) { found[i] = false; } for (int i = 0; i < 2 * N - 1; i++) { for (int j = i + 1; j < 2 * N; j++) { if (found[i + 1]) break; if (found[j + 1]) continue; vector<int> p(2); p[0] = i + 1; p[1] = j + 1; int result = Query(p); //cout << p[0] << " " << p[1] << " " << result << "\n"; if (result == 1) { found[i + 1] = true; found[j + 1] = true; Answer(i + 1, j + 1); //cout << "answer\n"; break; } } } /* std::vector<int> p(3); p[0] = 1; p[1] = 2; p[2] = 3; variable_example = Query(p); for (int i = 0; i < N; i++) { Answer(i * 2 + 1, i * 2 + 2); cout << "test\n"; } */ }

Compilation message (stderr)

chameleon.cpp:8:5: warning: '{anonymous}::variable_example' defined but not used [-Wunused-variable]
    8 | int variable_example = 1;
      |     ^~~~~~~~~~~~~~~~
#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...