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

Submission #144896

#TimeUsernameProblemLanguageResultExecution timeMemory
144896sochoCoins (IOI17_coins)C++14
100 / 100
14 ms1712 KiB
#include "coins.h" #include <bits/stdc++.h> using namespace std; vector<int> coin_flips(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(vector<int> b) { int a = 0; for (int i=0; i<b.size(); i++) { if (b[i] == 1) { a = a ^ i; } } return a; }

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