Submission #918643

#TimeUsernameProblemLanguageResultExecution timeMemory
918643HaciyevAlikCoins (IOI17_coins)C++14
10 / 100
7 ms1612 KiB
#include <bits/stdc++.h> #include "coins.h" using namespace std; vector<int> coin_flips(vector<int> b, int c) { vector<int> flips(1); if(c==0) { if(!(b[0]^b[1])) { if(b[0]==1 && b[1]==1) { flips[0]=1; } else { flips[0]=0; } } else { if(b[0]==1 && b[1]==0) { flips[0]=0; } else { flips[0]=1; } } } else { if(!(b[0]^b[1])) { if(b[0]==1) { flips[0]=0; } else { flips[0]=1; } } else { if(b[0]==1&&b[1]==0) { flips[0]=1; } else { flips[0]=0; } } } return flips; } int find_coin(vector<int> b) { int x=b[0],y=b[1]; if(!(x^y)) { if(x==1) { return 1; } else { return 0; } } else { if(x==1 && y==0) { return 0; } else { return 1; } } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...