# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
320612 | 2020-11-09T08:52:04 Z | arnold518 | Park (JOI17_park) | C++14 | 274 ms | 496 KB |
#include "park.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; const int MAXN = 1500; int T, N; int P[MAXN+10]; int query(int A, int B) { return Ask(A, B, P); } void Detect(int _T, int _N) { T=_T; N=_N; for(int i=0; i<N; i++) P[i]=1; vector<int> V; for(int i=1; i<N-1; i++) V.push_back(i); sort(V.begin(), V.end(), [&](const int &p, const int &q) { if(p==q) return false; P[p]=0; int t=query(0, q); P[p]=1; return !t; }); Answer(0, V.front()); for(int i=0; i+1<V.size(); i++) Answer(V[i], V[i+1]); Answer(V.back(), N-1); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 364 KB | Wrong Answer[2] |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 236 ms | 492 KB | Wrong Answer[1] |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 229 ms | 484 KB | Wrong Answer[1] |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 106 ms | 484 KB | Wrong Answer[1] |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 274 ms | 496 KB | Wrong Answer[2] |
2 | Halted | 0 ms | 0 KB | - |