Submission #710368

#TimeUsernameProblemLanguageResultExecution timeMemory
710368Darren0724Minerals (JOI19_minerals)C++17
6 / 100
6 ms336 KiB
#include "minerals.h" //#include "grader.cpp" #include<bits/stdc++.h> using namespace std; void Solve(int N) { vector<int> v(N*2+1,-1); for(int i=1;i<=N*2;i++){ Query(i); for(int j=i+1;j<=N*2;j++){ int p=Query(j); Query(j); if(p==1){ v[i]=j; v[j]=i; break; } } Query(i); } for(int i=1;i<=N*2;i++){ //cout<<i<<' '<<v[i]<<endl; if(i<v[i])Answer(i,v[i]); } }
#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...