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

#TimeUsernameProblemLanguageResultExecution timeMemory
333081gouravkhungerCoins (IOI17_coins)C++14
10 / 100
12 ms1712 KiB
#include "coins.h" #include<bits/stdc++.h> std::vector<int> coin_flips(std::vector<int> b, int c) { std::vector <int> flips; for(int i=0;i<64;i++){ if(i!=c){ if(b[i]==b[c]) flips.push_back(i); } } if(flips.size()==0){ flips.push_back(c); flips.push_back(c); } return flips; } int find_coin(std::vector<int> b) { int temp; if(count(b.begin(),b.end(),1)>1) temp=0; else temp=1; for(int i=0;i<64;i++){ if(b[i]==temp) return(i); } }

Compilation message (stderr)

coins.cpp: In function 'int find_coin(std::vector<int>)':
coins.cpp:25:1: warning: control reaches end of non-void function [-Wreturn-type]
   25 | }
      | ^
#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...