# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1219141 | lukasuliashvili | Coins (IOI17_coins) | C++20 | 0 ms | 0 KiB |
#include "coins.h"
#include <bits/stdc++.h>
using namespace std;
#define int long long
std::vector<int> coin_flips(std::vector<int> b, int c) {
int k;
vector<int> flip;
for(int i=0; i<=63; i++){
if(b[i]==1){
k^=i;
}
}
int y=c^k;
flip.pb(y);
return flip;
}
int find_coin(std::vector<int> b) {
int idx=0;
for(int i=0; i<=63; i++){
if(b[i]==1){
idx^=i;
}
}
return idx;
}