제출 #864480

#제출 시각아이디문제언어결과실행 시간메모리
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; }

컴파일 시 표준 에러 (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...