Submission #697171

#TimeUsernameProblemLanguageResultExecution timeMemory
697171amunduzbaevPark (JOI17_park)C++17
10 / 100
28 ms420 KiB
#include "park.h" #include "bits/stdc++.h" using namespace std; #ifndef EVAL #include "grader.cpp" #endif mt19937 rng(chrono :: steady_clock :: now().time_since_epoch().count()); 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); }; vector<int> p(n); iota(p.begin(), p.end(), 0); shuffle(p.begin(), p.end(), rng); for(int i=0;i<n;i++){ for(int j=0;j<i;j++){ if(ask(p[i], p[j], {p[i], p[j]})){ Ans(p[i], p[j]); } } } return; } /* 1 6 7 0 1 0 3 1 2 1 4 2 4 2 5 3 4 */
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...