Submission #766391

# Submission time Handle Problem Language Result Execution time Memory
766391 2023-06-25T15:34:48 Z irmuun Hotter Colder (IOI10_hottercolder) C++17
50 / 100
386 ms 8104 KB
#include<bits/stdc++.h>
 
using namespace std;
 
#define pb push_back
#define ll long long
#define ff first
#define ss second
#define all(s) s.begin(),s.end()

int Guess(int n);

int HC(int n){
    int l=1,r=n;
    while(l<r){
        int mid=(l+r)/2;
        int q1=Guess(mid),q2=Guess(mid+1);
        if(q2==1){
            l=mid+1;
        }
        else{
            r=mid;
        }
    }
    return l;
}

Compilation message

hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:17:13: warning: unused variable 'q1' [-Wunused-variable]
   17 |         int q1=Guess(mid),q2=Guess(mid+1);
      |             ^~
# Verdict Execution time Memory Grader output
1 Correct 15 ms 1236 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 15 ms 1300 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 15 ms 1300 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 386 ms 8104 KB Output isn't correct - alpha = 0.000000000000