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

#TimeUsernameProblemLanguageResultExecution timeMemory
72896FedericoSCoins (IOI17_coins)C++14
100 / 100
15 ms1776 KiB
#include <iostream> #include "coins.h" using namespace std; std::vector<int> coin_flips(std::vector<int> b, int c) { vector<int> v; int ans=0; for(int i=0;i<64;i++) ans^=b[i]*i; for(int i=0;i<64;i++) if((ans^i)==c){ b[i]=(b[i]+1)%2; v.push_back(i); return v; } return v; } int find_coin(std::vector<int> b) { int ans=0; for(int i=0;i<64;i++) ans^=b[i]*i; return ans; }

Compilation message (stderr)

coins.cpp: In function 'std::vector<int> coin_flips(std::vector<int>, int)':
coins.cpp:13:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
     for(int i=0;i<64;i++)
     ^~~
coins.cpp:20:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
  return v;
  ^~~~~~
#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...