Submission #68699

# Submission time Handle Problem Language Result Execution time Memory
68699 2018-08-18T08:26:03 Z Talant The Big Prize (IOI17_prize) C++17
20 / 100
4 ms 600 KB
#include "prize.h"
//#include "grader.cpp"

#include <bits/stdc++.h>

#define sc second
#define fr first
#define pb push_back
#define mk make_pair

using namespace std;

int find_best(int n) {
      int l = 0,r = n - 1;

      while (r - l > 1) {
            int m = (r + l) >> 1;
            vector <int> v = ask(m);

            if (v[0] + v[1] == 0) return m;
            if (v[0] > v[1]) r = m;
            else l = m;
      }
      vector<int> v = ask(l);
      if (v[0] + v[1] == 0) return l;
      return r;
}
# Verdict Execution time Memory Grader output
1 Correct 4 ms 376 KB Output is correct
2 Correct 3 ms 440 KB Output is correct
3 Correct 2 ms 440 KB Output is correct
4 Correct 4 ms 440 KB Output is correct
5 Correct 3 ms 524 KB Output is correct
6 Correct 3 ms 600 KB Output is correct
7 Correct 2 ms 600 KB Output is correct
8 Correct 2 ms 600 KB Output is correct
9 Correct 2 ms 600 KB Output is correct
10 Correct 2 ms 600 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 2 ms 600 KB Output is correct
2 Correct 2 ms 600 KB Output is correct
3 Correct 3 ms 600 KB Output is correct
4 Correct 3 ms 600 KB Output is correct
5 Correct 2 ms 600 KB Output is correct
6 Correct 2 ms 600 KB Output is correct
7 Correct 2 ms 600 KB Output is correct
8 Correct 3 ms 600 KB Output is correct
9 Correct 2 ms 600 KB Output is correct
10 Correct 2 ms 600 KB Output is correct
11 Incorrect 3 ms 600 KB answer is not correct
12 Halted 0 ms 0 KB -