제출 #580817

#제출 시각아이디문제언어결과실행 시간메모리
580817HeyYouNotYouYouCoins (IOI17_coins)C++14
0 / 100
1083 ms980 KiB
#include "coins.h" #include<bits/stdc++.h> using namespace std; 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 } } } 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; }

컴파일 시 표준 에러 (stderr) 메시지

coins.cpp: In function 'std::vector<int> coin_flips(std::vector<int>, int)':
coins.cpp:19:1: warning: no return statement in function returning non-void [-Wreturn-type]
   19 | }
      | ^
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...