| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1308391 | qntls | Coins (IOI17_coins) | C++20 | 0 ms | 0 KiB |
#include "coins.h"
#include <bits/stdc++.h>
using namespace std;
vector<int> coin_flips(vector<int>& b, int c){
int ans = 0;
for (int i = 0; i < 64; i++){
if(b[i]==1) ans = ans ^ i;
}
int Xor = ans ^ c;
b[Xor] ^= 1;
return b;
}
int find_coin(int[] b){
int ans = 0;
for (int i = 0; i < 64; i++){
if (b[i]==1) ans = ans ^ i;
}
return ans;
}
