Submission #125385

# Submission time Handle Problem Language Result Execution time Memory
125385 2019-07-05T07:20:31 Z 이온조(#3059) Park (JOI17_park) C++14
10 / 100
45 ms 504 KB
#include "park.h"
#include <bits/stdc++.h>
using namespace std;

static int N, P[1400];

void answer(int u, int v) {
	if(u > v) swap(u, v);
	// printf("answer: %d %d\n", u, v);
	Answer(u, v);
}

int ask(int A, int B, int p[]) {
	if(A > B) swap(A, B);
	// printf("A: %d, B: %d\n", A, B);
	// printf("PLACE: ");
	// for(int i=0; i<N; i++) printf("%d", p[i]);
	// printf("\n result: ");
	int tmp = Ask(A, B, p);
	// printf("%d\n", tmp);
	return tmp;
}

void Detect(int T, int N) {
	::N = N;

	for(int i=0; i<N; i++) {
		for(int j=i+1; j<N; j++) {
			P[i] = P[j] = 1;
			if(ask(i, j, P)) answer(i, j);
			P[i] = P[j] = 0;
		}
	}
}
# Verdict Execution time Memory Grader output
1 Correct 2 ms 376 KB Output is correct
2 Correct 8 ms 376 KB Output is correct
3 Correct 8 ms 376 KB Output is correct
4 Correct 9 ms 504 KB Output is correct
5 Correct 9 ms 376 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 45 ms 376 KB Wrong Answer[5]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 44 ms 376 KB Wrong Answer[5]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 34 ms 376 KB Wrong Answer[5]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 45 ms 452 KB Wrong Answer[5]
2 Halted 0 ms 0 KB -