# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
840861 | PurpleCrayon | Soccer Stadium (IOI23_soccer) | C++17 | 4399 ms | 1151512 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 "soccer.h"
#include <bits/stdc++.h>
using namespace std;
#define ar array
#define sz(v) int(v.size())
typedef long long ll;
const int INF = 1e9+10;
const int M = 2e3+10, L = 12;
struct Sparse {
int sparse[L][M];
Sparse() {}
Sparse(vector<int>& v) {
int n = v.size();
for (int j = 0; j < n; j++) sparse[0][j] = v[j];
for (int i = 1; (1 << i) <= n; i++) {
for (int j = 0; j + (1 << i) <= n; j++) {
sparse[i][j] = min(sparse[i-1][j], sparse[i-1][j + (1 << (i-1))]);
}
}
}
inline int qry(int l, int r) {
int b = 31 - __builtin_clz(r - l + 1);
return min(sparse[b][l], sparse[b][r - (1 << b) + 1]);
}
} ones[M], twos[M];
int get_cost(int i, int l, int r) {
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |