Submission #1072877

#TimeUsernameProblemLanguageResultExecution timeMemory
1072877HappyCapybaraMinerals (JOI19_minerals)C++17
6 / 100
4 ms344 KiB
#include "minerals.h" #include<bits/stdc++.h> using namespace std; void Solve(int N){ vector<bool> done(2*N); int cur = 0, m = 0; while (cur < 2*N){ int x = Query(cur+1); if (x == m+1){ m = x; cur++; continue; } for (int i=0; i<cur; i++){ if (done[i]) continue; int y = Query(i+1); Query(i+1); if (y == m){ //cout << y+1 << " " << cur+1 << "\n"; Answer(i+1, cur+1); done[i] = true; done[cur] = true; break; } } cur++; } }
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...