(UPD: 2024-12-04 14:48 UTC) Judge is not working due to Cloudflare incident. (URL) We can do nothing about it, sorry. After the incident is resolved, we will grade all submissions.

제출 #122861

#제출 시각아이디문제언어결과실행 시간메모리
122861tjd229Coins (IOI17_coins)C++14
100 / 100
14 ms1580 KiB
#include "coins.h" std::vector<int> coin_flips(std::vector<int> b, int c) { for (int i = 0; i < b.size(); ++i) if (b[i]) c ^= i; return { c }; } int find_coin(std::vector<int> b) { int c = 0; for (int i = 0; i < b.size(); ++i) if (b[i]) c ^= i; return c; }

컴파일 시 표준 에러 (stderr) 메시지

coins.cpp: In function 'std::vector<int> coin_flips(std::vector<int>, int)':
coins.cpp:4:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i = 0; i < b.size(); ++i) if (b[i]) c ^= i;
                  ~~^~~~~~~~~~
coins.cpp: In function 'int find_coin(std::vector<int>)':
coins.cpp:10:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
  for (int i = 0; i < b.size(); ++i) if (b[i]) c ^= 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...