(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.

제출 #144895

#제출 시각아이디문제언어결과실행 시간메모리
144895sochoCoins (IOI17_coins)C++14
100 / 100
13 ms1772 KiB
#include "coins.h" #include <bits/stdc++.h> using namespace std; std::vector<int> coin_flips(std::vector<int> b, int c) { int a = 0; for (int i=0; i<b.size(); i++) { if (b[i] == 1) { a = a ^ i; } } vector<int> L; L.push_back(a ^ c); return L; } int find_coin(std::vector<int> b) { int a = 0; for (int i=0; i<b.size(); i++) { if (b[i] == 1) { a = a ^ i; } } return a; }

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

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