Submission #433970

# Submission time Handle Problem Language Result Execution time Memory
433970 2021-06-20T12:53:57 Z KoD Hotter Colder (IOI10_hottercolder) C++17
0 / 100
587 ms 156644 KB
#include "grader.h"

// char dp[501][501][501];
// short select[501][501][501];

// char dfs(const int l, const int r, const int x) {
//    if (l == r) return 0;
//    if (dp[l][r][x] != 0) return dp[l][r][x];
//    char min = 100;
//    for (int i = 1; i < x; ++i) {
//       const int m = (i + x) / 2;
//       char max = 0;
//       max = std::max();
//    }

// }

int HC(int N) {
   int l = 1, r = N, x = 1;
   Guess(x);
   while (l < r) {
      if (x == l) {
         const int t = Guess(r);
         if (t == 0) return (l + r) / 2;
         else if (t == 1) l = (l + r + 1) / 2;
         else r = (l + r) / 2;
      } else {
         const int t = Guess(l);
         if (t == 0) return (l + r) / 2;
         else if (t == 1) r = (l + r) / 2;
         else l = (l + r + 1) / 2;
      }
   }
   return l;
}
# Verdict Execution time Memory Grader output
1 Incorrect 44 ms 17500 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 39 ms 17476 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 39 ms 17484 KB Output isn't correct
# Verdict Execution time Memory Grader output
1 Incorrect 587 ms 156644 KB Output isn't correct - alpha = 0.000000000000