# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1074248 | 2024-08-25T09:03:03 Z | beaconmc | Hotter Colder (IOI10_hottercolder) | C++14 | 525 ms | 8188 KB |
#include "grader.h" #include <bits/stdc++.h> typedef long long ll; #define FOR(i,x,y) for(ll i=x; i<y; i++) #define FORNEG(i,x,y) for(lli = x; i>y; i--) using namespace std; ll n; int guess(ll a){ if (a==0) return -1; if (a==n+1) return -1; return Guess(a); } int solve(int a, int b){ if (a==b) return a; ll mid = (a+b)/2; ll midval = guess(mid); ll right = guess(mid+1); ll left = guess(mid-1); if (left == -1 && right==0 || left==-1 && right==-1){ return mid; } if (left == -1){ return solve(mid+1, b); }else{ return solve(a, mid); } } int HC(int N){ n = N; ll ans = solve(1,N); return ans; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 22 ms | 1372 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 22 ms | 1372 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 22 ms | 1432 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 525 ms | 8188 KB | Output isn't correct - alpha = 0.000000000000 |
2 | Halted | 0 ms | 0 KB | - |