# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
365135 | 2021-02-10T23:17:48 Z | MilosMilutinovic | Hotter Colder (IOI10_hottercolder) | C++14 | 0 ms | 0 KB |
#include "grader.h" #include <bits/stdc++.h> using namespace std; int Guess(int G); int HC(int n){ if (n == 1) { return 1; } int ans = 0; vector<int> b; for (int i = 1; i <= n; i++) { b.push_back(Guess(i)); } if (b[0] == 0 && b[1] == -1) { return 1; } int ans = 1; for (int i = 0; i < n; i++) { if (b[i] == 1 && (i == n - 1 || b[i + 1] == -1)) { ans = i + 1; } } return ans; }