#include<bits/stdc++.h>
using namespace std;
std::vector<int> coin_flips(vector<int> b, int c){
int mult=1;
int spot=0;
for(int i=0;i<8;i++){
int par=0;
for(int j=0;j<64;j++){
par+=b[j]*((j & mult)!=0);
}
spot+=(par%2)*mult;
mult*=2;
}
return{spot ^ c};
}
int find_coin(vector<int> b){
int mult=1;
int spot=0;
for(int i=0;i<8;i++){
int par=0;
for(int j=0;j<64;j++){
par+=b[j]*((j & mult)!=0);
}
spot+=(par%2)*mult;
mult*=2;
}
return spot;
}
# | 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... |