Submission #1179009

#TimeUsernameProblemLanguageResultExecution timeMemory
1179009tamyteArt 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); int n; 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)

/usr/bin/ld: /tmp/ccCksorb.o: in function `main':
interface.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/cc4SkSCf.o:art.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccCksorb.o: in function `main':
interface.cpp:(.text.startup+0x16): undefined reference to `solve(int)'
collect2: error: ld returned 1 exit status