# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
312797 | BeanZ | Restore Array (RMI19_restore) | C++14 | 379 ms | 1404 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.
// I_Love_LPL
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define endl '\n'
const int N = 5005;
struct viet{
ll u, v, c;
};
ll d[N];
int main(){
ios_base::sync_with_stdio(false);
cin.tie(0);
if (fopen("A.inp", "r")){
freopen("test.inp", "r", stdin);
freopen("test.out", "w", stdout);
}
ll n, m;
cin >> n >> m;
for (int i = 1; i <= n; i++) d[i] = i;
vector<viet> E;
for (int i = 1; i <= m; i++){
ll l, r, k, v;
cin >> l >> r >> k >> v;
l++;
r++;
if (v == 1){
E.push_back({r, l - 1, -(r - l + 1 - k + 1)});
} else {
// S(r) - S(l - 1) <= (r - l + 1 - k)
Compilation message (stderr)
# | 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... |