Submission #573914

# Submission time Handle Problem Language Result Execution time Memory
573914 2022-06-07T12:02:38 Z Sho10 Hotter Colder (IOI10_hottercolder) C++17
Compilation error
0 ms 0 KB
#include "grader.h"
#include "hottercolder.h"
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <iostream>

static int moves, TT, NN, prev = -1;
int Guess(int x){
   int r;
   if (prev == -1 || abs(x-TT) == abs(prev-TT)) r = 0;
   else if (abs(x-TT) > abs(prev-TT)) r = -1;
   else r = 1;
   prev = x;
   //printf("%d %d",x);
   if (x < 1 || x > NN) exit(92);
   moves++;
   return r;
}

int main(){
   int n=0,i,t,OK=0,sub1=0,sub2=0,sub3=0,mx=0;
   double worst = 999999;
  for(int X=1;X<=500;X++){
        for(int T=1;T<=X;T++){
                NN=X;
        TT=T;
      //  printf("%d %d ",X,T);
      prev = -1;
      moves = 0;
      int h = HC(NN);
      if (h != TT) {
           // printf("DA");
            printf("%d %d %d",NN,TT,h);
         exit(91);
      }
      sub2=0;
      sub3=0;
      if ( NN <= 500 && moves > 500 ) exit(93);
      if ( NN <= 500 && moves <=18 ) sub2=1;
      if ( NN <= 500 && moves <=16 ) sub3=1;
      OK++;
      if(moves>mx){
        mx=moves;
      }
      if(!sub3){
            //printf("DA");
            printf("%d",moves);
        printf("%d %d",X,T);
        exit(91);
      }
}
  }
 printf("%d",moves);
}

Compilation message

hottercolder.cpp:2:10: fatal error: hottercolder.h: No such file or directory
    2 | #include "hottercolder.h"
      |          ^~~~~~~~~~~~~~~~
compilation terminated.