# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
304858 | tatyam | Hotter Colder (IOI10_hottercolder) | C++17 | 816 ms | 24568 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
int Guess(int G);
struct T{
map<int, int> a;
T(){
for(int n = 1; n < 30; n++){
const int x = ((1 << n + 1) + (n & 1 ? -1 : 1)) / 3;
const int y = ((1 << n) + (n & 1 ? -1 : 1) * 2) / 3 + 1;
a[x] = y;
}
}
int operator[](int x) const {
return a.upper_bound(x)->second;
}
} edge;
int HC(int N){
if(N == 1) return 1;
int l = 1, r = N, p = (l + r) / 2 + 1;
Guess(p);
bool first = 1;
while(l < r){
const int p2 = [&]{
if(first){
first = 0;
return (l + r) / 2;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |