Submission #119527

# Submission time Handle Problem Language Result Execution time Memory
119527 2019-06-21T10:55:46 Z sealnot123 Hotter Colder (IOI10_hottercolder) C++14
50 / 100
800 ms 8224 KB
#ifdef LOCAL
#include "grader.cpp"
#endif

#include "grader.h"
#include<bits/stdc++.h>
#define x first
#define y second
#define pb push_back
#define eb emplace_back
#define all(a) (a).begin(),(a).end()
#define SZ(a) (int)(a).size()
using namespace std;
typedef long long LL;
typedef pair<LL,LL> PLL;
typedef pair<int,int> PII;
typedef double D;
typedef long double LD;
int HC(int N){
    int l,r,i,j,k,a,b,c,d,e,m;
    int last = 0;
    l = 1;
    r = N;
    while(l < r){
        m = (l+r)>>1;
//        printf("%d %d\n", l, r);
        int res = Guess(l);
        res = Guess(r);
        if(res == 0) return m;
        if(res<0) r = m;
        else l = m+1;
    }
    return l;
}

Compilation message

hottercolder.cpp: In function 'int HC(int)':
hottercolder.cpp:20:13: warning: unused variable 'i' [-Wunused-variable]
     int l,r,i,j,k,a,b,c,d,e,m;
             ^
hottercolder.cpp:20:15: warning: unused variable 'j' [-Wunused-variable]
     int l,r,i,j,k,a,b,c,d,e,m;
               ^
hottercolder.cpp:20:17: warning: unused variable 'k' [-Wunused-variable]
     int l,r,i,j,k,a,b,c,d,e,m;
                 ^
hottercolder.cpp:20:19: warning: unused variable 'a' [-Wunused-variable]
     int l,r,i,j,k,a,b,c,d,e,m;
                   ^
hottercolder.cpp:20:21: warning: unused variable 'b' [-Wunused-variable]
     int l,r,i,j,k,a,b,c,d,e,m;
                     ^
hottercolder.cpp:20:23: warning: unused variable 'c' [-Wunused-variable]
     int l,r,i,j,k,a,b,c,d,e,m;
                       ^
hottercolder.cpp:20:25: warning: unused variable 'd' [-Wunused-variable]
     int l,r,i,j,k,a,b,c,d,e,m;
                         ^
hottercolder.cpp:20:27: warning: unused variable 'e' [-Wunused-variable]
     int l,r,i,j,k,a,b,c,d,e,m;
                           ^
hottercolder.cpp:21:9: warning: unused variable 'last' [-Wunused-variable]
     int last = 0;
         ^~~~
# Verdict Execution time Memory Grader output
1 Correct 29 ms 1272 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 29 ms 1276 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 28 ms 1272 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 800 ms 8224 KB Output isn't correct - alpha = 0.000000000000