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"
std::vector<int> coin_flips(std::vector<int> b, int c) {
int xor_sum = 0;
int n = b.size();
for (int i = 0; i < n; i++) {
if (b[i]) xor_sum ^= i;
}
int flip = c ^ xor_sum;
return {flip};
}
int find_coin(std::vector<int> b) {
int xor_sum = 0;
int n = b.size();
for (int i = 0; i < n; i++) {
if (b[i]) xor_sum ^= i;
}
return xor_sum;
}
# | 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... |