제출 #1011739

#제출 시각아이디문제언어결과실행 시간메모리
1011739uranhishigHotter Colder (IOI10_hottercolder)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; int Guess(int G); //int run(int L, int R) { // if(L == R){ // return 1; // } //} int HC(int n){ int x = 0, i; bool x = true; for(int i = 1; i <= 500; i++){ if(Guess(i) == -1){ break; x = false; } } if(x){ cout << "500" << endl; } else{ cout << i << endl; } }

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

hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:14:7: error: conflicting declaration 'bool x'
   14 |  bool x = true;
      |       ^
hottercolder.cpp:13:6: note: previous declaration as 'int x'
   13 |  int x = 0, i;
      |      ^
hottercolder.cpp:28:1: warning: no return statement in function returning non-void [-Wreturn-type]
   28 | }
      | ^