Submission #1011743

# Submission time Handle Problem Language Result Execution time Memory
1011743 2024-07-01T07:56:19 Z uranhishig Hotter Colder (IOI10_hottercolder) C++14
0 / 100
249 ms 32340 KB
#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 q = 0, i;
	bool x = true;
   for(int i = 1; i <= 500; i++){
   		if(Guess(i) == -1){
   				q = i;
   				x = false;
   				break;
		   }
   }
   if(x){
   		cout << "500" << endl;
   }
   else{
   	   cout << q << endl;
   }

}

Compilation message

hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:13:13: warning: unused variable 'i' [-Wunused-variable]
   13 |  int q = 0, i;
      |             ^
hottercolder.cpp:29:1: warning: no return statement in function returning non-void [-Wreturn-type]
   29 | }
      | ^
# Verdict Execution time Memory Grader output
1 Runtime error 12 ms 13404 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 11 ms 13404 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 11 ms 13400 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 249 ms 32340 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -