Submission #657012

#TimeUsernameProblemLanguageResultExecution timeMemory
657012JuanFoehn Phenomena (JOI17_foehn_phenomena)C++17
0 / 100
469 ms7880 KiB
#include<bits/stdc++.h> using namespace std; const int maxn = 2e5 + 5; int v[maxn]; int main(){ int n, q, s, t; cin >> n >> q >> s >> t; for(int i = 0; i <= n; i++) cin >> v[i]; long long ans = v[n]; while(q--){ int l, r, x; cin >> l >> r >> x; if(r==n) ans -= x; cout << ans*t << '\n'; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...