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"
#include <bits/stdc++.h>
using namespace std;
void print(vector<int>v) {
for(int i = 0 ; i < 8 ; i++) {
for(int j = 0 ; j < 8 ; j++) {
cout << v[8*i+j];
} cout << "\n";
}
}
vector<int> coin_flips(vector<int>b, int c) {
const int n = 64;
int mask = 0;
for(int i = 0 ; i < n ; i++) {
if(b[i]&1) mask^=i;
}
int need=0;
if(mask != c) {
//cout << mask << " ";
need = mask^c;
}
return {need};
}
int find_coin(vector<int> b) {
const int n = 64;
//print(b);
int mask = 0;
for(int i = 0 ; i < n ; i++) {
if(b[i]&1) mask^=i;
}
//return mask;
//cout << " -- " << mask << " ";
return mask;
}
# | 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... |