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>
#include "coins.h"
using namespace std;
vector<int> coin_flips(vector<int> b, int c) {
vector<int> flip;
for(int i=5;i>=0;--i) {
if(((c>>i&1) && !b[5-i]) || (!(c>>i&1) && b[5-i])) {
flip.push_back(5-i);
}
}
while(int(flip.size())<8){
flip.push_back(63);
}
return flip;
}
int find_coin(vector<int> b) {
int res=0;
for(int i=0;i<=5;++i) {
if(b[i]==1) {
res+=(1<<(5-i));
}
}
return res;
}
# | 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... |