Submission #580822

#TimeUsernameProblemLanguageResultExecution timeMemory
580822HeyYouNotYouYouCoins (IOI17_coins)C++14
Compilation error
0 ms0 KiB
#include "coins.h" #include "grader.cpp" #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]==0&&b[1]==1) flips.push_back(1); //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]==0) flips.push_back(1); //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:29:1: warning: control reaches end of non-void function [-Wreturn-type]
   29 | }
      | ^
/usr/bin/ld: /tmp/cctREywV.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccRpzxUU.o:coins.cpp:(.text.startup+0x0): first defined here
collect2: error: ld returned 1 exit status