# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1058539 | 1ne | Xylophone (JOI18_xylophone) | C++17 | 0 ms | 356 KiB |
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 "xylophone.h"
#include <bits/stdc++.h>
using namespace std;
static int A[5000];
void solve(int N) {
int i = 1;
while(query(i,N) == N - 1){
++i;
}
answer(i - 1,1);
for (int j = 1;j<=N;++j){
if (j != i - 1){
int u = j,v = i - 1;
if (u > v)swap(u,v);
answer(j,query(u,v) + 1);
}
}
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |