Submission #697168

# Submission time Handle Problem Language Result Execution time Memory
697168 2023-02-08T17:13:18 Z amunduzbaev Park (JOI17_park) C++17
10 / 100
24 ms 384 KB
#include "park.h"
#include "bits/stdc++.h"
using namespace std;
#ifndef EVAL
#include "grader.cpp"
#endif

static int used[1400];
void Detect(int t, int n){
	auto ask = [&](int a, int b, vector<int> t){
		for(auto x : t) used[x] = 1;
		if(a > b) swap(a, b);
		int ans = Ask(a, b, used);
		for(auto x : t) used[x] = 0;
		return ans;
	};
	
	auto Ans = [&](int i, int j){
		if(i > j) swap(i, j);
		Answer(i, j);
	};
	
	for(int i=0;i<n;i++){
		for(int j=0;j<i;j++){
			if(ask(i, j, {i, j})){
				Ans(i, j);
			}
		}
	}
}


/*

1
6
7
0 1
0 3
1 2
1 4
2 4
2 5
3 4

*/
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 5 ms 212 KB Output is correct
3 Correct 5 ms 212 KB Output is correct
4 Correct 6 ms 304 KB Output is correct
5 Correct 5 ms 312 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 23 ms 340 KB Wrong Answer[5]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 23 ms 384 KB Wrong Answer[5]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 23 ms 340 KB Wrong Answer[5]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 24 ms 340 KB Wrong Answer[5]
2 Halted 0 ms 0 KB -