Submission #1133943

#TimeUsernameProblemLanguageResultExecution timeMemory
1133943AgageldiXoractive (IZhO19_xoractive)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #include "interactive.h" using namespace std; #define ll long long #define N 200005 #define pb push_back #define ff first #define ss second #define sz(s) (int)s.size() int val; vector <int> a, b, c, d, h; vector <pair<int,int> > answer; map <int,int> vis, vip; vector <int> guess(int n) { val = ask(n); answer.pb(make_pair(val, n)); for(int i = 0; i <= 7; i++) { b.clear(); h.clear(); vip.clear(); for(int j = 1; j < n; j++) { if((j&(1 << i))) b.pb(j); } if(!sz(b)) continue; deque <int> a1 = get_pairwise_xor(b); b.pb(n); deque <int> a2 = get_pairwise_xor(b); for(auto j : a1) { vip[j]++; } for(auto j : a2) { vip[j]--; } for(auto j : vip) { if(j.ff && j.ss) vis[j.ff ^ val] |= (1<<i); } } for(auto i : vis) { answer.pb(make_pair(i.ss,i.ff)); } sort(answer.begin(),answer.end()); for(auto i:answer) { a.pb(i.ss); } return a; }

Compilation message (stderr)

Xoractive.cpp: In function 'std::vector<int> guess(int)':
Xoractive.cpp:28:50: error: conversion from 'std::vector<int>' to non-scalar type 'std::deque<int>' requested
   28 |                 deque <int> a1 = get_pairwise_xor(b);
      |                                  ~~~~~~~~~~~~~~~~^~~
Xoractive.cpp:30:50: error: conversion from 'std::vector<int>' to non-scalar type 'std::deque<int>' requested
   30 |                 deque <int> a2 = get_pairwise_xor(b);
      |                                  ~~~~~~~~~~~~~~~~^~~