(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 #331113

#TimeUsernameProblemLanguageResultExecution timeMemory
331113PetyCoins (IOI17_coins)C++14
100 / 100
17 ms1840 KiB
#include <bits/stdc++.h> #include "coins.h" using namespace std; vector<int> coin_flips (vector<int> b, int c) { vector<int>flep; int sum = 0; for (int i = 0; i < 64; i++) if (b[i]) sum ^= i; flep.push_back(sum ^ c); return flep; } int find_coin (vector<int> b) { int sum = 0; for (int i = 0; i < b.size(); i++) if (b[i]) sum ^= i; return sum; }

Compilation message (stderr)

coins.cpp: In function 'int find_coin(std::vector<int>)':
coins.cpp:18:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   18 |   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...