Submission #918665

#TimeUsernameProblemLanguageResultExecution timeMemory
918665ayankarimovaCoins (IOI17_coins)C++14
10 / 100
7 ms1496 KiB
#include "coins.h" using namespace std; vector<int> coin_flips(vector<int> b, int c) { vector<int> flips(1); if(b[0]==0 && b[1]==1 && c==0){ flips[0]=1; } if(b[0]==0 && b[1]==1 && c==1){ flips[0]=0; } if(b[0]==1 && b[1]==0 && c==0){ flips[0]=0; } if(b[0]==1 && b[1]==0 && c==1){ flips[0]=1; } if(b[0]==0 && b[1]==0 && c==0){ flips[0]=0; } if(b[0]==0 && b[1]==0 && c==1){ flips[0]=1; } if(b[0]==1 && b[1]==1 && c==0){ flips[0]=1; } if(b[0]==1 && b[1]==1 && c==1){ flips[0]=0; } return flips; } int find_coin(vector<int> b) { if(b[0]==0 && b[1]==0) return 0; if(b[0]==1 && b[1]==1) return 1; if(b[0]==0 && b[1]==1) return 1; if(b[0]==1 && b[1]==0) return 0; }

Compilation message (stderr)

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