#include<bits/stdc++.h>
#define all(v) v.begin(),v.end()
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
using PP = pair<ll, P>;
const ll n_ =1e7+10, inf = (ll)2e9 * (ll)1e9 + 7, mod = 998244353;
ll n, m, tc = 1, a, b, c, d, sum, x, y, z, base, ans, k;
#include "Alice.h"
#include "Bob.h"
ll idx[n_],bit[n_];
vector<pair<int,int>> Alice(){
// add your code here
// change below into your code
long long x = setN(5000);
vector<pair<int,int>>res;
for(int i=1;i<=5000;i++)idx[i]=i
for(int i=2;i<5000;i++){
bit[i]=(++base)%60;
//0 ~ 59
}
for(int i=1;i<n_;i++){
a=rand()%n+1,b=rand()%n+1;
swap(idx[a],idx[b]);
}
for(int i=2;i<n;i++){
if((1ll<<bit[i]) & x){
res.push_back({i,5000});
}
else{
res.push_back({1,i});
}
}
res.push_back({1,5000});
return res;
}
long long Bob(vector<pair<int,int>> V){
// add your code here
ll res=0;
for(auto [a,b]:v){
if(a==1 && b==5000)continue;
if(b==5000){
res|=(1ll<<bit[a]);
}
}
return res; // change this into your code
}
#include<bits/stdc++.h>
#define all(v) v.begin(),v.end()
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
using PP = pair<ll, P>;
const ll n_ =1e7+10, inf = (ll)2e9 * (ll)1e9 + 7, mod = 998244353;
ll n, m, tc = 1, a, b, c, d, sum, x, y, z, base, ans, k;
#include "Alice.h"
#include "Bob.h"
ll idx[n_],bit[n_];
vector<pair<int,int>> Alice(){
// add your code here
// change below into your code
long long x = setN(5000);
vector<pair<int,int>>res;
for(int i=1;i<=5000;i++)idx[i]=i
for(int i=2;i<5000;i++){
bit[i]=(++base)%60;
//0 ~ 59
}
for(int i=1;i<n_;i++){
a=rand()%n+1,b=rand()%n+1;
swap(idx[a],idx[b]);
}
for(int i=2;i<n;i++){
if((1ll<<bit[i]) & x){
res.push_back({i,5000});
}
else{
res.push_back({1,i});
}
}
res.push_back({1,5000});
return res;
}
long long Bob(vector<pair<int,int>> V){
// add your code here
ll res=0;
for(auto [a,b]:v){
if(a==1 && b==5000)continue;
if(b==5000){
res|=(1ll<<bit[a]);
}
}
return res; // change this into your code
}
Compilation message
Alice.cpp: In function 'std::vector<std::pair<int, int> > Alice()':
Alice.cpp:18:37: error: expected ';' before 'for'
18 | for(int i=1;i<=5000;i++)idx[i]=i
| ^
| ;
19 | for(int i=2;i<5000;i++){
| ~~~
Alice.cpp:19:17: error: 'i' was not declared in this scope
19 | for(int i=2;i<5000;i++){
| ^
Alice.cpp: In function 'long long int Bob(std::vector<std::pair<int, int> >)':
Alice.cpp:43:17: error: 'v' was not declared in this scope
43 | for(auto [a,b]:v){
| ^
Bob.cpp: In function 'std::vector<std::pair<int, int> > Alice()':
Bob.cpp:18:37: error: expected ';' before 'for'
18 | for(int i=1;i<=5000;i++)idx[i]=i
| ^
| ;
19 | for(int i=2;i<5000;i++){
| ~~~
Bob.cpp:19:17: error: 'i' was not declared in this scope
19 | for(int i=2;i<5000;i++){
| ^
Bob.cpp: In function 'long long int Bob(std::vector<std::pair<int, int> >)':
Bob.cpp:43:17: error: 'v' was not declared in this scope
43 | for(auto [a,b]:v){
| ^