제출 #341480

#제출 시각아이디문제언어결과실행 시간메모리
341480IwanttobreakfreeCluedo (IOI10_cluedo)C++98
0 / 100
1 ms364 KiB
#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> #include "grader.h" #include "cluedo.h" using namespace std; int Murderer,Location,Weapon,devolver; int Theory(int& M,int& L,int& W){ while (devolver!=0){ cin>>Murderer>>Location>>Weapon; if (M!=Murderer){ return devolver= 1; } else if (L!=Location){ return devolver= 2; } else if (W!=Weapon){ return devolver= 3; } else{ return devolver= 0; } } } void Solve(){ int r; r = Theory(1,2,3); if (r == 0) return; r = Theory(3,2,1); if (r == 0) return; r = Theory(4,4,4); if (r == 0) return; }

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

cluedo.cpp: In function 'int Theory(int&, int&, int&)':
cluedo.cpp:28:1: warning: control reaches end of non-void function [-Wreturn-type]
   28 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...