제출 #918665

#제출 시각아이디문제언어결과실행 시간메모리
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; }

컴파일 시 표준 에러 (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...