Submission #580818

#TimeUsernameProblemLanguageResultExecution timeMemory
580818HeyYouNotYouYouCoins (IOI17_coins)C++14
0 / 100
1 ms900 KiB
#include "coins.h" #include<bits/stdc++.h> using namespace std; vector<int> coin_flips(std::vector<int> b, int c) { vector<int> flips; ////////subtask 1 and 2 if(c<2){ //[0,0],[0,1],[1,0],[1,1] if(c==0){ if(b[0]==0&&b[1]==0) flips.push_back(0); //10 if(b[0]==1&&b[1]==0) flips.push_back(0); //00 if(b[0]==1&&b[1]==1) flips.push_back(1); //10 }else if(c==1){ if(b[0]==0&&b[1]==0) flips.push_back(1); //01 if(b[0]==0&&b[1]==1) flips.push_back(0); //11 if(b[0]==1&&b[1]==1) flips.push_back(0); //01 } } return flips; } int find_coin(std::vector<int> b) { if((b[0]==1&&b[1]==0)||(b[0]==0&&b[1]==0)) return 0; if((b[0]==0&&b[1]==1)||(b[0]==1&&b[1]==1)) return 1; }

Compilation message (stderr)

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