Submission #1038170

#TimeUsernameProblemLanguageResultExecution timeMemory
1038170HanksburgerCoins (IOI17_coins)C++17
0 / 100
1 ms1052 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) { vector<int> tmp; tmp.push_back(i); return tmp; } } 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; }

Compilation message (stderr)

coins.cpp: In function 'std::vector<int> coin_flips(std::vector<int>, int)':
coins.cpp:16:1: warning: control reaches end of non-void function [-Wreturn-type]
   16 | }
      | ^
#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...