Submission #1179006

#TimeUsernameProblemLanguageResultExecution timeMemory
1179006tamyteArt Collections (BOI22_art)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; using ll = long long; const int N = 2e5; #include "art.h" int main() { ios::sync_with_stdio(0); cin.tie(0); cin >> n; // res = vector<int>(n); // iota(begin(res), end(res), 1); // random_shuffle(begin(res), end(res)); // cout << "EXPECTED : "; // for (auto& u : res) { // cout << u << " "; // } // cout << endl; // pos = vector<int>(n + 1); // for (int i = 0; i < res.size(); ++i) { // pos[res[i]] = i; // } vector<int> response(n); for (int i = 0; i < n; ++i) { vector<int> q; for (int j = 0; j < n; ++j) { q.push_back((i + j) % n + 1); response[i] = publish(q); } // for (auto& u : q) { // cout << u << " "; // } // cout << " = " << response[i] << "\n"; } vector<int> ans(n); for (int i = 0; i < n; ++i) { int init_pos = (response[i] - response[(i + 1) % n] + n) / 2; ans[init_pos] = i + 1; } answer(ans); // for (auto& u : response) { // cout << u << endl; // } }

Compilation message (stderr)

art.cpp: In function 'int main()':
art.cpp:11:12: error: 'n' was not declared in this scope
   11 |     cin >> n;
      |            ^