Submission #864480

#TimeUsernameProblemLanguageResultExecution timeMemory
864480dukkunCoins (IOI17_coins)C++14
0 / 100
6 ms1368 KiB
#include "coins.h" std::vector<int> coin_flips(std::vector<int> b, int c) { std::vector<int> flips(1); int x = c; for (int i = 0 ; i < b.size() ; i++) { if (b[i] == 1) { x ^= i; } } flips[0] = x; return flips; } int find_coin(std::vector<int> b) { int ret = 0; for (int &u: b) { ret ^= u; } return ret; }

Compilation message (stderr)

coins.cpp: In function 'std::vector<int> coin_flips(std::vector<int>, int)':
coins.cpp:6:24: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
    6 |     for (int i = 0 ; i < b.size() ; 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...