Submission #831105

#TimeUsernameProblemLanguageResultExecution timeMemory
831105PanosPaskCoins (IOI17_coins)C++14
0 / 100
2 ms1080 KiB
#include "coins.h" std::vector<int> coin_flips(std::vector<int> b, int c) { std::vector<int> flips(1); int N = 64; int xorsum = 0; for (int i = 0; i < N; i++) { if (b[i]) xorsum = xorsum ^ i; } flips[0] = xorsum ^ c; } int find_coin(std::vector<int> b) { int xorsum = 0; int N=64; for (int i = 0; i < N; i++) if (b[i]) xorsum = xorsum ^ i; return xorsum; }

Compilation message (stderr)

coins.cpp: In function 'std::vector<int> coin_flips(std::vector<int>, int)':
coins.cpp:15:1: warning: no return statement in function returning non-void [-Wreturn-type]
   15 | }
      | ^
#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...