This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |