Submission #1278742

#TimeUsernameProblemLanguageResultExecution timeMemory
1278742friendiksArt Collections (BOI22_art)C++20
Compilation error
0 ms0 KiB
#ifndef LOCAL #pragma GCC optimize("O3") #pragma GCC optimize("unroll-loops") #pragma GCC diagnostic ignored "-Wpedantic" #endif #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #include "art.h" using namespace std; using namespace __gnu_pbds; auto seed = chrono::high_resolution_clock::now().time_since_epoch().count(); mt19937 rnd(seed); template<typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; template<typename T, typename V> using table = gp_hash_table<T, V>; using i128 = __int128; using ll = long long; using ld = long double; using uint = unsigned int; using ull = unsigned long long; const ll INF = 1e18; const int inf = 2e9; const int maxk = 140; const int MOD = 1e9 + 7; const double pi = acos(-1); const int P = 5167; const int L = 26; const ld EPS = 1e-7; const int W = 3; const int MBIT = 18; const int maxn = 1e7 + 7; const int B = 550; template<typename T, typename V> void fill(T &container, V value) { for (auto &c : container) c = value; } #define int ll void solve(int n) { vector<int> val(n); for (int i = 0; i < n; ++i) { int a, b; vector<int> A, B; B.push_back(i + 1); for (int j = 0; j < n; ++j) { if (j == i) continue; A.push_back(j + 1); B.push_back(j + 1); } A.push_back(i + 1); a = publish(A); b = publish(B); val[i] = (a - b + n + 1) / 2; } vector<int> ans(n); for (int i = 0; i < n; ++i) ans[val[i] - 1] = i + 1; answer(ans); } signed mainT() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout << fixed << setprecision(9); #ifdef LOCAL freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif int t = 1; //cin >> t; while (t--) solve(0); //stress(); #ifdef LOCAL cout << "\n\n\n=====================================================\nProgram worked for: "; cout << (ld) clock() / CLOCKS_PER_SEC << "s"; #endif }

Compilation message (stderr)

art.cpp: In function 'void solve(ll)':
art.cpp:61:21: error: could not convert 'A' from 'vector<long long int>' to 'vector<int>'
   61 |         a = publish(A);
      |                     ^
      |                     |
      |                     vector<long long int>
art.cpp:62:21: error: could not convert 'B' from 'vector<long long int>' to 'vector<int>'
   62 |         b = publish(B);
      |                     ^
      |                     |
      |                     vector<long long int>
art.cpp:67:12: error: could not convert 'ans' from 'vector<long long int>' to 'vector<int>'
   67 |     answer(ans);
      |            ^~~
      |            |
      |            vector<long long int>
art.cpp: In function 'int mainT()':
art.cpp:86:1: warning: no return statement in function returning non-void [-Wreturn-type]
   86 | }
      | ^