# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
117174 | 2019-06-15T07:32:30 Z | onjo0127 | None (JOI16_ho_t5) | C++11 | 29 ms | 8312 KB |
#include <bits/stdc++.h> using namespace std; const int O = 500; int A[1009][1009]; int main() { int N, Q; scanf("%d%d",&N,&Q); for(int i=0; i<=1000; i++) { for(int j=0; j<=1000; j++) { A[i][j] = i; } } while(Q--) { int X, D, L; scanf("%d%d%d",&X,&D,&L); X += O; if(D == 1) { for(int i=0; i<=1000; i++) { for(int j=X-i; j>=1; j--) { A[i][j] = A[i+1][j-1]; } } } if(D == 2) { for(int i=0; i<=1000; i++) { for(int j=X+i+1; j<=1000; j++) { A[i][j] = A[i+1][j+1]; } } } } for(int i=O+1; i<=O+N; i++) printf("%d\n", A[0][i]); return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 13 ms | 4324 KB | Output is correct |
2 | Correct | 15 ms | 4352 KB | Output is correct |
3 | Correct | 14 ms | 4224 KB | Output is correct |
4 | Correct | 15 ms | 4352 KB | Output is correct |
5 | Correct | 16 ms | 4352 KB | Output is correct |
6 | Correct | 15 ms | 4352 KB | Output is correct |
7 | Correct | 14 ms | 4352 KB | Output is correct |
8 | Correct | 13 ms | 4224 KB | Output is correct |
9 | Correct | 15 ms | 4268 KB | Output is correct |
10 | Correct | 15 ms | 4328 KB | Output is correct |
11 | Correct | 15 ms | 4352 KB | Output is correct |
12 | Correct | 12 ms | 4352 KB | Output is correct |
13 | Correct | 13 ms | 4224 KB | Output is correct |
14 | Correct | 13 ms | 4224 KB | Output is correct |
15 | Correct | 14 ms | 4224 KB | Output is correct |
16 | Correct | 14 ms | 4224 KB | Output is correct |
17 | Correct | 14 ms | 4224 KB | Output is correct |
18 | Correct | 13 ms | 4224 KB | Output is correct |
19 | Correct | 13 ms | 4352 KB | Output is correct |
20 | Correct | 18 ms | 4352 KB | Output is correct |
21 | Correct | 15 ms | 4352 KB | Output is correct |
22 | Correct | 13 ms | 4352 KB | Output is correct |
23 | Correct | 13 ms | 4224 KB | Output is correct |
24 | Correct | 13 ms | 4224 KB | Output is correct |
25 | Correct | 5 ms | 4224 KB | Output is correct |
26 | Correct | 5 ms | 4224 KB | Output is correct |
27 | Correct | 5 ms | 4352 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 13 ms | 4324 KB | Output is correct |
2 | Correct | 15 ms | 4352 KB | Output is correct |
3 | Correct | 14 ms | 4224 KB | Output is correct |
4 | Correct | 15 ms | 4352 KB | Output is correct |
5 | Correct | 16 ms | 4352 KB | Output is correct |
6 | Correct | 15 ms | 4352 KB | Output is correct |
7 | Correct | 14 ms | 4352 KB | Output is correct |
8 | Correct | 13 ms | 4224 KB | Output is correct |
9 | Correct | 15 ms | 4268 KB | Output is correct |
10 | Correct | 15 ms | 4328 KB | Output is correct |
11 | Correct | 15 ms | 4352 KB | Output is correct |
12 | Correct | 12 ms | 4352 KB | Output is correct |
13 | Correct | 13 ms | 4224 KB | Output is correct |
14 | Correct | 13 ms | 4224 KB | Output is correct |
15 | Correct | 14 ms | 4224 KB | Output is correct |
16 | Correct | 14 ms | 4224 KB | Output is correct |
17 | Correct | 14 ms | 4224 KB | Output is correct |
18 | Correct | 13 ms | 4224 KB | Output is correct |
19 | Correct | 13 ms | 4352 KB | Output is correct |
20 | Correct | 18 ms | 4352 KB | Output is correct |
21 | Correct | 15 ms | 4352 KB | Output is correct |
22 | Correct | 13 ms | 4352 KB | Output is correct |
23 | Correct | 13 ms | 4224 KB | Output is correct |
24 | Correct | 13 ms | 4224 KB | Output is correct |
25 | Correct | 5 ms | 4224 KB | Output is correct |
26 | Correct | 5 ms | 4224 KB | Output is correct |
27 | Correct | 5 ms | 4352 KB | Output is correct |
28 | Runtime error | 29 ms | 8312 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
29 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 13 ms | 4324 KB | Output is correct |
2 | Correct | 15 ms | 4352 KB | Output is correct |
3 | Correct | 14 ms | 4224 KB | Output is correct |
4 | Correct | 15 ms | 4352 KB | Output is correct |
5 | Correct | 16 ms | 4352 KB | Output is correct |
6 | Correct | 15 ms | 4352 KB | Output is correct |
7 | Correct | 14 ms | 4352 KB | Output is correct |
8 | Correct | 13 ms | 4224 KB | Output is correct |
9 | Correct | 15 ms | 4268 KB | Output is correct |
10 | Correct | 15 ms | 4328 KB | Output is correct |
11 | Correct | 15 ms | 4352 KB | Output is correct |
12 | Correct | 12 ms | 4352 KB | Output is correct |
13 | Correct | 13 ms | 4224 KB | Output is correct |
14 | Correct | 13 ms | 4224 KB | Output is correct |
15 | Correct | 14 ms | 4224 KB | Output is correct |
16 | Correct | 14 ms | 4224 KB | Output is correct |
17 | Correct | 14 ms | 4224 KB | Output is correct |
18 | Correct | 13 ms | 4224 KB | Output is correct |
19 | Correct | 13 ms | 4352 KB | Output is correct |
20 | Correct | 18 ms | 4352 KB | Output is correct |
21 | Correct | 15 ms | 4352 KB | Output is correct |
22 | Correct | 13 ms | 4352 KB | Output is correct |
23 | Correct | 13 ms | 4224 KB | Output is correct |
24 | Correct | 13 ms | 4224 KB | Output is correct |
25 | Correct | 5 ms | 4224 KB | Output is correct |
26 | Correct | 5 ms | 4224 KB | Output is correct |
27 | Correct | 5 ms | 4352 KB | Output is correct |
28 | Runtime error | 29 ms | 8312 KB | Execution killed with signal 11 (could be triggered by violating memory limits) |
29 | Halted | 0 ms | 0 KB | - |