Submission #918556

#TimeUsernameProblemLanguageResultExecution timeMemory
918556vjudge1Coins (IOI17_coins)C++17
100 / 100
9 ms1860 KiB
#include<bits/stdc++.h> #include "coins.h" #define ll int using namespace std; vector<int> coin_flips(vector<int> b, int c) { ll x = 0, i, j; for(i = 0; i<64; i++){ if(b[i]){ x ^= i; } } x ^= c; vector<int> flips(1); flips[0] = x; return flips; } int find_coin(vector<int> b) { ll x = 0, i; for(i = 0; i<64; i++){ if(b[i]){ x ^= i; } } return x; }

Compilation message (stderr)

coins.cpp: In function 'std::vector<int> coin_flips(std::vector<int>, int)':
coins.cpp:6:18: warning: unused variable 'j' [-Wunused-variable]
    6 |     ll x = 0, i, j;
      |                  ^
#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...