# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1114983 | 2024-11-19T21:24:18 Z | AdamGS | Fire (JOI20_ho_t5) | C++17 | 249 ms | 262144 KB |
#include <bits/stdc++.h> using namespace std; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); long long n,q,k,l,p,maks=0; cin >> n >> q; vector<long long>c1; vector<vector<long long>>c3; for(int i=0;i<n;++i){ cin >> k; c1.push_back(k); } for(int i=0;i<=200;++i){ for(int j=n-1;j>0;--j){ c1[j]=max(c1[j],c1[j-1]); } c3.push_back(c1); } for(long long i=0;i<q;++i){ cin >> k >> l >>p; long long suma=0; for(long long j=l-1;j<p;++j){ //cout << c3[k-1][j] << ' '; suma +=c3[k-1][j]; } cout << suma << endl; } return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 336 KB | Output is correct |
2 | Correct | 1 ms | 592 KB | Output is correct |
3 | Correct | 2 ms | 592 KB | Output is correct |
4 | Correct | 2 ms | 760 KB | Output is correct |
5 | Correct | 2 ms | 592 KB | Output is correct |
6 | Correct | 1 ms | 604 KB | Output is correct |
7 | Correct | 2 ms | 592 KB | Output is correct |
8 | Correct | 2 ms | 592 KB | Output is correct |
9 | Correct | 1 ms | 592 KB | Output is correct |
10 | Correct | 2 ms | 764 KB | Output is correct |
11 | Correct | 2 ms | 592 KB | Output is correct |
12 | Correct | 2 ms | 592 KB | Output is correct |
13 | Correct | 2 ms | 592 KB | Output is correct |
14 | Correct | 2 ms | 592 KB | Output is correct |
15 | Correct | 2 ms | 592 KB | Output is correct |
16 | Correct | 2 ms | 800 KB | Output is correct |
17 | Correct | 2 ms | 592 KB | Output is correct |
18 | Correct | 2 ms | 592 KB | Output is correct |
19 | Correct | 1 ms | 592 KB | Output is correct |
20 | Correct | 2 ms | 796 KB | Output is correct |
21 | Correct | 2 ms | 592 KB | Output is correct |
22 | Correct | 2 ms | 760 KB | Output is correct |
23 | Correct | 2 ms | 592 KB | Output is correct |
24 | Correct | 1 ms | 592 KB | Output is correct |
25 | Correct | 2 ms | 592 KB | Output is correct |
26 | Correct | 2 ms | 592 KB | Output is correct |
27 | Correct | 2 ms | 592 KB | Output is correct |
28 | Correct | 2 ms | 760 KB | Output is correct |
29 | Correct | 1 ms | 592 KB | Output is correct |
30 | Correct | 1 ms | 592 KB | Output is correct |
31 | Correct | 1 ms | 592 KB | Output is correct |
32 | Correct | 1 ms | 592 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 336 KB | Output is correct |
2 | Runtime error | 249 ms | 262144 KB | Execution killed with signal 9 |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 336 KB | Output is correct |
2 | Runtime error | 234 ms | 262144 KB | Execution killed with signal 9 |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Runtime error | 225 ms | 262144 KB | Execution killed with signal 9 |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 336 KB | Output is correct |
2 | Correct | 1 ms | 592 KB | Output is correct |
3 | Correct | 2 ms | 592 KB | Output is correct |
4 | Correct | 2 ms | 760 KB | Output is correct |
5 | Correct | 2 ms | 592 KB | Output is correct |
6 | Correct | 1 ms | 604 KB | Output is correct |
7 | Correct | 2 ms | 592 KB | Output is correct |
8 | Correct | 2 ms | 592 KB | Output is correct |
9 | Correct | 1 ms | 592 KB | Output is correct |
10 | Correct | 2 ms | 764 KB | Output is correct |
11 | Correct | 2 ms | 592 KB | Output is correct |
12 | Correct | 2 ms | 592 KB | Output is correct |
13 | Correct | 2 ms | 592 KB | Output is correct |
14 | Correct | 2 ms | 592 KB | Output is correct |
15 | Correct | 2 ms | 592 KB | Output is correct |
16 | Correct | 2 ms | 800 KB | Output is correct |
17 | Correct | 2 ms | 592 KB | Output is correct |
18 | Correct | 2 ms | 592 KB | Output is correct |
19 | Correct | 1 ms | 592 KB | Output is correct |
20 | Correct | 2 ms | 796 KB | Output is correct |
21 | Correct | 2 ms | 592 KB | Output is correct |
22 | Correct | 2 ms | 760 KB | Output is correct |
23 | Correct | 2 ms | 592 KB | Output is correct |
24 | Correct | 1 ms | 592 KB | Output is correct |
25 | Correct | 2 ms | 592 KB | Output is correct |
26 | Correct | 2 ms | 592 KB | Output is correct |
27 | Correct | 2 ms | 592 KB | Output is correct |
28 | Correct | 2 ms | 760 KB | Output is correct |
29 | Correct | 1 ms | 592 KB | Output is correct |
30 | Correct | 1 ms | 592 KB | Output is correct |
31 | Correct | 1 ms | 592 KB | Output is correct |
32 | Correct | 1 ms | 592 KB | Output is correct |
33 | Runtime error | 249 ms | 262144 KB | Execution killed with signal 9 |
34 | Halted | 0 ms | 0 KB | - |