Submission #319454

#TimeUsernameProblemLanguageResultExecution timeMemory
319454shaf_wa_nurICC (CEOI16_icc)C++17
0 / 100
447 ms768 KiB
#include <bits/stdc++.h> #include "icc.h" using namespace std; void run(int n) { int cnt = 0; while (cnt != n - 1) { for (int bit = 0; bit < 7; bit++) { vector<int> A; vector<int> B; for (int x = 1; x <= n; x++) { bool on = (x >> bit) & 1; (on ? A.push_back(x) : B.push_back(x)); } if ((int) A.size() > 0 and (int) B.size() > 0) { int a[(int) A.size()]; for (int i = 0; i < (int) A.size(); i++) { a[i] = A[i]; } int b[(int) B.size()]; for (int i = 0; i < (int) B.size(); i++) { b[i] = B[i]; } int ret = query((int) A.size(), (int) B.size(), a, b); if (ret) { for (int x : A) { for (int y : B) { int _a[] = {x}; int _b[] = {y}; ret = query(1, 1, _a, _b); if (ret) { cnt += 1; 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...