Submission #1058539

#TimeUsernameProblemLanguageResultExecution timeMemory
10585391neXylophone (JOI18_xylophone)C++17
0 / 100
0 ms356 KiB
#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)

xylophone.cpp:4:12: warning: 'A' defined but not used [-Wunused-variable]
    4 | static int A[5000];
      |            ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...