# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
684467 | kusssso | Foehn Phenomena (JOI17_foehn_phenomena) | C++17 | 108 ms | 10688 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;
const int N = 2e5 + 5;
int n, q;
ll s, t;
int a[N];
int d[N];
ll decr, incr;
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cin >> n >> q >> s >> t;
s = -s;
for (int i = 0; i <= n; i++) cin >> a[i];
for (int i = 1; i <= n; i++) {
d[i] = a[i] - a[i - 1];
if (d[i] > 0)
decr += d[i];
else
incr += abs(d[i]);
}
while (q--) {
int l, r, x;
cin >> l >> r >> x;
if (d[l] > 0)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |