Submission #782055

#TimeUsernameProblemLanguageResultExecution timeMemory
782055Dan4LifeCoins (IOI17_coins)C++17
Compilation error
0 ms0 KiB
#include <vector> using namespace std; using vi = vector<int>; vi coin_flips(vi b, int c){int x=0;for(int i=0;i<64;i++)c^=b[i]*i;return {c});} int find_coin(vi a) {int x=0;for(int i=0;i<64;i++)x^=a[i]*i;return x;}

Compilation message (stderr)

coins.cpp: In function 'vi coin_flips(vi, int)':
coins.cpp:4:77: error: expected ';' before ')' token
    4 | vi coin_flips(vi b, int c){int x=0;for(int i=0;i<64;i++)c^=b[i]*i;return {c});}
      |                                                                             ^
      |                                                                             ;
coins.cpp:4:77: error: expected primary-expression before ')' token
coins.cpp:4:32: warning: unused variable 'x' [-Wunused-variable]
    4 | vi coin_flips(vi b, int c){int x=0;for(int i=0;i<64;i++)c^=b[i]*i;return {c});}
      |                                ^