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

#TimeUsernameProblemLanguageResultExecution timeMemory
44524MatheusLealVCoins (IOI17_coins)C++17
100 / 100
13 ms1640 KiB
#include <bits/stdc++.h> using namespace std; vector<int> coin_flips(vector<int> a, int x) { int X = 0; for(int i = 0; i < a.size(); i++) if(a[i]) X ^= i; vector<int> F; F.push_back(X ^ x); return F; } int find_coin(vector<int> a) { int X = 0; for(int i = 0; i < a.size(); i++) if(a[i]) X ^= i; return X; }

Compilation message (stderr)

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