Submission #686597

# Submission time Handle Problem Language Result Execution time Memory
686597 2023-01-25T14:27:47 Z minhcool Xoractive (IZhO19_xoractive) C++17
Compilation error
0 ms 0 KB
#include<bits/stdc++.h>
using namespace std;

//#define int long long
#define fi first
#define se second
#define pb push_back
#define mp make_pair

typedef pair<int, int> ii;
typedef pair<ii, int> iii;
typedef pair<ii, ii> iiii;

const int N = 3e5 + 5;

const int oo = 1e18 + 7, mod = 1e9 + 7;

vector<int> guess(int n){
	vector<int> ans;
	int x = ask(1);
	ans.pb(x);
	for(int i = 2; i <= n; i++){
		vector<int> pos;
		pos.pb(i - 1), pos.pb(i);
		vector<int> temp = get_pairwise_xor(pos);
		x ^= temp.back();
		ans.pb(x);
	}
	return ans;
}

/*
void process(){

}

signed main(){
	ios_base::sync_with_stdio(0);
	int t;
	cin >> t;
	while(t--) process();
}
*/

Compilation message

Xoractive.cpp:16:21: warning: overflow in conversion from 'double' to 'int' changes value from '1.0e+18' to '2147483647' [-Woverflow]
   16 | const int oo = 1e18 + 7, mod = 1e9 + 7;
      |                ~~~~~^~~
Xoractive.cpp: In function 'std::vector<int> guess(int)':
Xoractive.cpp:20:10: error: 'ask' was not declared in this scope
   20 |  int x = ask(1);
      |          ^~~
Xoractive.cpp:25:22: error: 'get_pairwise_xor' was not declared in this scope
   25 |   vector<int> temp = get_pairwise_xor(pos);
      |                      ^~~~~~~~~~~~~~~~