Submission #1038178

#TimeUsernameProblemLanguageResultExecution timeMemory
1038178HanksburgerCoins (IOI17_coins)C++17
0 / 100
2 ms1048 KiB
#include "coins.h" #include <bits/stdc++.h> using namespace std; vector<int> coin_flips(vector<int> b, int c) { int s=0, t=0; for (int i=0; i<64; i++) s+=b[i], t+=i*b[i]; for (int i=0; i<64; i++) if (((1-(s+1-b[i]*2)%4/2*2)*(t+(1-b[i]*2)*i)+6400)%64==c) return vector<int>(1, i); return vector<int>(0); } int find_coin(vector<int> b) { int s=0, t=0; for (int i=0; i<64; i++) s+=b[i], t+=i*b[i]; return ((1-s%4/2*2)*t+6400)%64; }
#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...