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;
#define db long double
#define ll long long
#define pii pair<int, int>
#define pll pair<ll, ll>
#define vi vector<int>
#define vl vector<ll>
#define vii vector<pii>
#define vll vector<pll>
// #define endl '\n'
#define all(x) x.begin(), x.end()
#define fastio\
ios_base::sync_with_stdio(0);\
cin.tie(0);\
cout.tie(0)\
vector<int> coin_flips(std::vector<int> b, int c) {
std::vector<int> flips(1);
ll xr = c;
for(int i = 0; i < 63; i++){
if(b[i]){
xr ^= (1LL << i);
}
}
flips[xr] = 1 - flips[xr];
return flips;
}
int find_coin(std::vector<int> b) {
ll xr = b[0];
for(int i = 1; i <= 63; i++){
xr ^= (1LL << i) * b[i];
}
return xr;
}
# | 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... |