# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1123996 | 3lektra | Coins (IOI17_coins) | C++20 | 0 ms | 0 KiB |
#include<bits/stdc++.h>
using namespace std;
int* coin_flips(int b[], int c){
int y = 0;
for(int i = 0; i < 64; ++i){
y = y^(i*b[i]);
}
int a = y^c;
cout << y << ' ' << a << '\n';
if(b[a])b[a] = 0;
else b[a] = 1;
return b;
}
int find_coins(int b[]){
int c;
for(int i = 0; i < 64; ++i){
c = c^(i*b[i]);
}
return c;
}