Submission #697168

#TimeUsernameProblemLanguageResultExecution timeMemory
697168amunduzbaevPark (JOI17_park)C++17
10 / 100
24 ms384 KiB
#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 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...