Submission #60418

# Submission time Handle Problem Language Result Execution time Memory
60418 2018-07-24T07:06:16 Z 윤교준(#1744) Park (JOI17_park) C++11
10 / 100
89 ms 700 KB
#include "park.h"
#include <bits/stdc++.h>
#define pb push_back
#define eb emplace_back
#define allv(V) ((V).begin()),((V).end())
#define sorv(V) sort(allv(V))
#define univ(V) (V).erase(unique(allv(V)),(V).end())
#define revv(V) reverse(allv(V))
#define sz(V) ((int)(V).size())
#define upmin(a,b) (a)=min((a),(b))
#define upmax(a,b) (a)=max((a),(b))
#define rb(x) ((x)&(-(x)))
#define INF (0x3f3f3f3f)
#define INFLL (0x3f3f3f3f3f3f3f3fll)
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;

static const int MAXN = 1405;

static int __ask[1400];
static int N;

static bool ask(int s, int e, vector<int> &V) {
	for(int i = 0; i < N; i++) __ask[i] = 0;
	for(int v : V) __ask[v] = 1;
	__ask[s] = __ask[e] = 1;
	return Ask(s, e, __ask);
}
static bool hasEdge(int a, int b) { vector<int> V; return ask(a, b, V); }

void Detect(int _T, int _N) {
	N = _N;

	for(int i = 0; i < N; i++) for(int j = i+1; j < N; j++)
		if(hasEdge(i, j)) Answer(i, j);
}
# Verdict Execution time Memory Grader output
1 Correct 3 ms 376 KB Output is correct
2 Correct 16 ms 376 KB Output is correct
3 Correct 16 ms 564 KB Output is correct
4 Correct 14 ms 564 KB Output is correct
5 Correct 22 ms 564 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 84 ms 572 KB Wrong Answer[5]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 89 ms 700 KB Wrong Answer[5]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 68 ms 700 KB Wrong Answer[5]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 84 ms 700 KB Wrong Answer[5]
2 Halted 0 ms 0 KB -