Submission #386969

#TimeUsernameProblemLanguageResultExecution timeMemory
386969victoriadCoins (IOI17_coins)C++14
0 / 100
12 ms1584 KiB
#include "coins.h" using namespace std; vector<int> coin_flips(vector<int> b, int c) { vector<int>co; int val=0; for(int i=0;i<64;i++){ if(b[i]==1)val^i; } co.push_back(val^c); return co; } int find_coin(vector<int> b) { int val=0; for(int i=0;i<64;i++){ if(b[i]==1)val^i; } return val; }

Compilation message (stderr)

coins.cpp: In function 'std::vector<int> coin_flips(std::vector<int>, int)':
coins.cpp:7:22: warning: statement has no effect [-Wunused-value]
    7 |        if(b[i]==1)val^i;
      |                   ~~~^~
coins.cpp: In function 'int find_coin(std::vector<int>)':
coins.cpp:17:22: warning: statement has no effect [-Wunused-value]
   17 |        if(b[i]==1)val^i;
      |                   ~~~^~
#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...