#include "coins.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define sp <<" "<<
#define endl "\n"
inline int array_xor(const vector<int> &a) {
int n = a.size();
int res = 0;
for (int i = 0; i < n; i++) {
if (a[i]) res ^= i;
}
return res;
}
vector<int> coin_flips(vector<int> b, int c) {
vector<int> flips = {c ^ array_xor(b)};
return flips;
}
int find_coin(vector<int> b) {
return array_xor(b);
}
# | 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... |