# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
703534 | SamNguyen | The Big Prize (IOI17_prize) | C++14 | 65 ms | 5340 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "prize.h"
#include <bits/stdc++.h>
using namespace std;
template <class T1, class T2>
inline bool minimise(T1 &x, T2 y) {
if (x > y) { x = y; return true; }
return false;
}
template <class T1, class T2>
inline bool maximise(T1 &x, T2 y) {
if (x < y) { x = y; return true; }
return false;
}
template <class F>
int FIND_SMALLEST(int l, int r, F f) {
int res = r + 1;
while (l <= r) {
int m = (l + r) / 2;
if (f(m)) res = m, r = m - 1;
else l = m + 1;
}
return res;
}
template <class F>
int FIND_LARGEST(int l, int r, F f) {
int res = l - 1;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |