# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
941697 | vjudge1 | Building 4 (JOI20_building4) | C++17 | 1 ms | 860 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;
using ll = long long;
#define int ll
#define endl '\n'
#define pb push_back
using pi = array<int, 2>;
template<class T> bool ckmin(T& a, const T& b) { return b < a ? a = b, 1 : 0; }
template<class T> bool ckmax(T& a, const T& b) { return a < b ? a = b, 1 : 0; }
/*
iau mereu cel mai mic posibil si dau switch
daca v[i][min] <= v[i + 1][min] si v[i][max] >= v[i + 1][min] si v[i][max] <= v[i + 1][max] atunci daca schimb i, schimb si i+1
pot sa iau sufix la cel mai mare interval
sufixul e un interval de valori (se schimba cu 1 costul)
v[i][0] = minimu
v[i][1] = maximu
balance = A - B
*/
const int INF = 1e9;
int32_t main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |