# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
559041 | _karan_gandhi | Coins (IOI17_coins) | C++17 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "coins.h"
std::vector<int> coin_flips(std::vector<int> b, int c) {
std::vector<int> filps(1);
int xr = c;
for (int i = 0; i < b.size(); i++) {
xr ^= b[i] * i;
}
flips[0] = xr;
return flips;
}
int find_coin(std::vector<int> b) {
int xr = 0;
for (int i = 0; i < b.size(); i++) {
xr ^= b[i] * i;
}
return xr;
}