Submission #1058525

# Submission time Handle Problem Language Result Execution time Memory
1058525 2024-08-14T10:32:52 Z 1ne Xylophone (JOI18_xylophone) C++17
0 / 100
1 ms 344 KB
#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

xylophone.cpp:4:12: warning: 'A' defined but not used [-Wunused-variable]
    4 | static int A[5000];
      |            ^
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB Wrong Answer [4]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB Wrong Answer [4]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 344 KB Wrong Answer [4]
2 Halted 0 ms 0 KB -