Submission #710367

#TimeUsernameProblemLanguageResultExecution timeMemory
710367Darren0724Minerals (JOI19_minerals)C++17
0 / 100
5 ms340 KiB
#include "minerals.h" #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;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...