제출 #1234642

#제출 시각아이디문제언어결과실행 시간메모리
1234642PenguinsAreCutePark (JOI17_park)C++17
10 / 100
162 ms648 KiB
#include "park.h" #include <bits/stdc++.h> using namespace std; void Detect(int T, int N) { mt19937 rng(69); auto dnc = [&rng,N](auto &self, vector<int> loc, int st, int nd) -> void { if(loc.empty()) { Answer(min(st,nd), max(st,nd)); return; } int x = loc[rng() % loc.size()]; vector<int> a, b; for(auto i: loc) if(i != x) { int place[N]; fill(place,place+N,1); place[i] = 0; if(Ask(min(st,x), max(st,x), place)) b.push_back(i); else a.push_back(i); } self(self, a, st, x); self(self, b, x, nd); }; vector<int> v(N-2); iota(v.begin(),v.end(),1); dnc(dnc,v,0,N-1); }
#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...