# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1118469 | adaawf | The Big Prize (IOI17_prize) | C++17 | 153 ms | 3728 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 <bits/stdc++.h>
using namespace std;
int a[200005], cc = 0, hh = 200000, dd[200005], c[200005][10], da[200005], b = 480;
void build(int n) {
for (int j = 0; j <= 9; j++) {
c[0][j] = (a[0] <= j);
for (int i = 1; i < n; i++) {
c[i][j] = c[i - 1][j] + (a[i] <= j);
}
}
}
mt19937 mt(chrono::steady_clock::now().time_since_epoch().count());
vector<int> ask(int i);
int find_best(int n) {
vector<pair<int, pair<int, int>>> v;
vector<int> t;
int mi = 0;
if (n <= 170000) {
for (int i = 0; i < 480; i++) {
t = ask(i);
if (t[0] + t[1] == 0) return i;
mi = max(mi, t[0] + t[1]);
}
}
else {
for (int i = 0; i < n; i++) da[i] = 0;
for (int i = 0; i < 440; i++) {
int h;
while (1) {
h = 1ll * (mt() % n) % n;
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |