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 "bits/stdc++.h"
using namespace std;
vector<int> coin_flips(vector<int> a,int c){
string bit="";
while(c){
bit+=(c%2?'1':'0');
c/=2;
}
reverse(bit.begin(),bit.end());
vector<int>res;
for(int i=0;i<6;i++){
if(bit[i]-'0'!=a[i])res.push_back(i);
}
return res;
}
int find_coin(vector<int>a){
int ans=1;
for(int i=0;i<6;i++)if(a[i])ans*=2;
return ans-1;
}
# | 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... |