Submission #909804

#TimeUsernameProblemLanguageResultExecution timeMemory
909804guechotjrhhMinerals (JOI19_minerals)C++14
6 / 100
6 ms344 KiB
#include "minerals.h" #include<vector> #include<set> using namespace std; int n, s; void Solve(int N) { n = N; s = n << 1; set<int> st; for (int i = 1; i <= s; i++) st.insert(i); while (st.size()) { int u = *st.begin(); Query(u); st.erase(st.begin()); for (int j : st) { int z = Query(j); Query(j); if (z == 1) { Answer(j, u); Query(u); st.erase(st.find(j)); break; } } } }
#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...