Submission #927247

# Submission time Handle Problem Language Result Execution time Memory
927247 2024-02-14T14:04:41 Z vjudge1 Hotter Colder (IOI10_hottercolder) C++11
Compilation error
0 ms 0 KB
#include <bits/stdc++.h>
using namespace std;

int Guess(int);

int HC(int n) {
    for(int i = 1; i <= n; i++) {
        for(int j = i + 2; j <= n; j++) {
            Guess(i)
            if(!Guess(j)) return (j + i) >> 1;
        }
    }
}

Compilation message

hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:9:21: error: expected ';' before 'if'
    9 |             Guess(i)
      |                     ^
      |                     ;
   10 |             if(!Guess(j)) return (j + i) >> 1;
      |             ~~       
hottercolder.cpp:13:1: warning: no return statement in function returning non-void [-Wreturn-type]
   13 | }
      | ^