Submission #1115715

#TimeUsernameProblemLanguageResultExecution timeMemory
1115715staszic_ojuzFire (JOI20_ho_t5)C++17
0 / 100
1038 ms3000 KiB
#include <iostream> using namespace std; int tr[200000]; int akttr[200000]; int main() { ios_base::sync_with_stdio(0); cin.tie(0); int n,q; cin >> n >> q; for (int i=0; i<n; i++){ cin >> tr[i]; } for (int i=0; i<q; i++){ int t,l,r,wyn=0; for (int i=0; i<n; i++) akttr[i]=tr[i]; cin >> t >> l >> r; for (int k=0; k<t; k++){ for (int j=n-1; j; j--){ akttr[j]=max(akttr[j],akttr[j-1]); } } for (int k=l-1; k<r; k++){ //cout << akttr[k] << ' '; wyn+=akttr[k]; } cout << wyn << '\n'; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...