Submission #882327

#TimeUsernameProblemLanguageResultExecution timeMemory
882327ono_de206ICC (CEOI16_icc)C++14
0 / 100
13 ms640 KiB
#include "icc.h" #include <bits/stdc++.h> using namespace std; #include<bits/stdc++.h> using namespace std; #define in insert #define all(x) x.begin(),x.end() #define pb push_back #define eb emplace_back #define ff first #define ss second //#define int long long typedef long long ll; typedef vector<int> vi; typedef set<int> si; typedef multiset<int> msi; typedef pair<int, int> pii; typedef vector<pii> vpii; const int mxn = 110; int A[mxn], B[mxn]; vector<int> g[mxn]; int ask(vector<int> a, vector<int> b) { int sza = 0, szb = 0; for(int x : a) { for(int y : g[x]) { A[sza++] = y; } } for(int x : b) { for(int y : g[x]) { B[szb++] = y; } } return query(sza, szb, A, B); } void run(int n) { vector<int> all; for(int i = 1; i <= n; i++) { g[i].pb(i); all.pb(i); } for(int t = 1; t < n; t++) { vector<int> a, b; for(int i = n; i >= 1; i--) { b.pb(i); } int x = -1, y = -1; for(int i = 1; i <= n; i++) { a.pb(i); b.pop_back(); int tmp = ask(a, b); if(tmp == 0 && y == -1 && x != -1) y = i; else if(tmp == 1 && x == -1) x = i; } setRoad(x, y); } }
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...