Submission #1351646

#TimeUsernameProblemLanguageResultExecution timeMemory
1351646kunzaZa183Hotter Colder (IOI10_hottercolder)C11
Compilation error
0 ms0 KiB
#include "grader.h"
#include <bits/stdc++.h>
using namespace std;

int HC(int N) {
  int l = 1, r = N;
  while (l < r) {
    // cout << l << " " << r << "\n";
    int mid = (l + r) / 2, mid2 = mid + 1;

    Guess(mid);
    int x = Guess(mid2);

    if (x == 1) {
      l = mid2;
    } else {
      r = mid;
    }

    if (l >= r) {
      break;
    }

    if (x == 1) {
      x = Guess(r);

      if (x == 0) {
        return (mid2 + r) / 2;
      } else if (x == 1) {
        l = (l + r) / 2 + 1;
      } else {
        r = (l + r + 1) / 2 - 1;
      }
    } else {
      x = Guess(l);

      if (x == 0) {
        return (l + mid2) / 2;
      } else if (x == 1) {
        r = (l + mid2 + 1) / 2 - 1;
      } else {
        l = (l + mid2) / 2 + 1;
      }
    }
  }
  return l;
}

Compilation message (stderr)

hottercolder.c:2:10: fatal error: bits/stdc++.h: No such file or directory
    2 | #include <bits/stdc++.h>
      |          ^~~~~~~~~~~~~~~
compilation terminated.