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

#TimeUsernameProblemLanguageResultExecution timeMemory
829622MrDebooCoins (IOI17_coins)C++17
100 / 100
8 ms1552 KiB
#include "coins.h" #include "bits/stdc++.h" using namespace std; std::vector<int> coin_flips(std::vector<int> b, int c) { bool bl=0; int g=0; for(int i=0;i<64;i++){ if(b[i])g^=i; } for(int i=0;i<b.size();i++){ if((g^i)==c){ bl=1; return {i}; } } assert(bl); return {}; } int find_coin(std::vector<int> b) { int g=0; for(int i=0;i<64;i++){ if(b[i])g^=i; } return g; }

Compilation message (stderr)

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