Submission #657014

#TimeUsernameProblemLanguageResultExecution timeMemory
657014JuanFoehn Phenomena (JOI17_foehn_phenomena)C++17
10 / 100
491 ms9856 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...