# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
72896 | FedericoS | Coins (IOI17_coins) | C++14 | 15 ms | 1776 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 <iostream>
#include "coins.h"
using namespace std;
std::vector<int> coin_flips(std::vector<int> b, int c) {
vector<int> v;
int ans=0;
for(int i=0;i<64;i++)
ans^=b[i]*i;
for(int i=0;i<64;i++)
if((ans^i)==c){
b[i]=(b[i]+1)%2;
v.push_back(i);
return v;
}
return v;
}
int find_coin(std::vector<int> b) {
int ans=0;
for(int i=0;i<64;i++)
ans^=b[i]*i;
return ans;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |