답안 #775631

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
775631 2023-07-06T16:28:52 Z hgmhc 단층 (JOI16_ho_t5) C++17
18 / 100
2 ms 716 KB
#include <bits/stdc++.h>
#define rep(i,a,b) for (auto i = (a); i <= (b); ++i)
#define per(i,a,b) for (auto i = (b); i >= (a); --i)
#define all(x) begin(x),end(x)
#define siz(x) int((x).size())
#define Mup(x,y) x = max(x,y)
#define mup(x,y) x = min(x,y)
#define dbg(...) fprintf(stderr,__VA_ARGS__)
#define fi first
#define se second
using namespace std; using ll = long long; using ii = pair<int,int>;

const int N = 103;
int n, q;
int b[N][3*N];

int main() {
    cin.tie(0)->sync_with_stdio(0);
    cin >> n >> q;
    rep(i,0,N-1) fill(b[i],b[i+1],i);
    rep(i,1,q) {
        int x, d, l;
        cin >> x >> d >> l;
        if (d == 1) {
            rep(k,0,N-2) {
                rep(j,1,N+x-1-k) {
                    b[k][j] = b[k+1][j-1];
                }
            }
        } else {
            rep(k,0,N-2) {
                rep(j,N+x+k,3*N-2) {
                    b[k][j] = b[k+1][j+1];
                }
            }
        }
        // rep(i,0,n) {
        //     rep(j,N,N+n) dbg("%d ", b[i][j]);
        //     dbg("\n");
        // }
        // dbg("----------------------\n");
    }
    rep(i,N,N+n-1) {
        printf("%d\n", b[0][i]);
    }
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 1 ms 340 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 1 ms 340 KB Output is correct
6 Correct 1 ms 340 KB Output is correct
7 Correct 1 ms 344 KB Output is correct
8 Correct 1 ms 328 KB Output is correct
9 Correct 1 ms 452 KB Output is correct
10 Correct 1 ms 328 KB Output is correct
11 Correct 1 ms 340 KB Output is correct
12 Correct 1 ms 340 KB Output is correct
13 Correct 1 ms 340 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 1 ms 324 KB Output is correct
16 Correct 1 ms 340 KB Output is correct
17 Correct 1 ms 340 KB Output is correct
18 Correct 1 ms 340 KB Output is correct
19 Correct 1 ms 328 KB Output is correct
20 Correct 1 ms 340 KB Output is correct
21 Correct 1 ms 340 KB Output is correct
22 Correct 1 ms 328 KB Output is correct
23 Correct 2 ms 340 KB Output is correct
24 Correct 1 ms 328 KB Output is correct
25 Correct 0 ms 340 KB Output is correct
26 Correct 1 ms 392 KB Output is correct
27 Correct 0 ms 340 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 1 ms 340 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 1 ms 340 KB Output is correct
6 Correct 1 ms 340 KB Output is correct
7 Correct 1 ms 344 KB Output is correct
8 Correct 1 ms 328 KB Output is correct
9 Correct 1 ms 452 KB Output is correct
10 Correct 1 ms 328 KB Output is correct
11 Correct 1 ms 340 KB Output is correct
12 Correct 1 ms 340 KB Output is correct
13 Correct 1 ms 340 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 1 ms 324 KB Output is correct
16 Correct 1 ms 340 KB Output is correct
17 Correct 1 ms 340 KB Output is correct
18 Correct 1 ms 340 KB Output is correct
19 Correct 1 ms 328 KB Output is correct
20 Correct 1 ms 340 KB Output is correct
21 Correct 1 ms 340 KB Output is correct
22 Correct 1 ms 328 KB Output is correct
23 Correct 2 ms 340 KB Output is correct
24 Correct 1 ms 328 KB Output is correct
25 Correct 0 ms 340 KB Output is correct
26 Correct 1 ms 392 KB Output is correct
27 Correct 0 ms 340 KB Output is correct
28 Runtime error 2 ms 716 KB Execution killed with signal 11
29 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 340 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 1 ms 340 KB Output is correct
4 Correct 1 ms 340 KB Output is correct
5 Correct 1 ms 340 KB Output is correct
6 Correct 1 ms 340 KB Output is correct
7 Correct 1 ms 344 KB Output is correct
8 Correct 1 ms 328 KB Output is correct
9 Correct 1 ms 452 KB Output is correct
10 Correct 1 ms 328 KB Output is correct
11 Correct 1 ms 340 KB Output is correct
12 Correct 1 ms 340 KB Output is correct
13 Correct 1 ms 340 KB Output is correct
14 Correct 1 ms 340 KB Output is correct
15 Correct 1 ms 324 KB Output is correct
16 Correct 1 ms 340 KB Output is correct
17 Correct 1 ms 340 KB Output is correct
18 Correct 1 ms 340 KB Output is correct
19 Correct 1 ms 328 KB Output is correct
20 Correct 1 ms 340 KB Output is correct
21 Correct 1 ms 340 KB Output is correct
22 Correct 1 ms 328 KB Output is correct
23 Correct 2 ms 340 KB Output is correct
24 Correct 1 ms 328 KB Output is correct
25 Correct 0 ms 340 KB Output is correct
26 Correct 1 ms 392 KB Output is correct
27 Correct 0 ms 340 KB Output is correct
28 Runtime error 2 ms 716 KB Execution killed with signal 11
29 Halted 0 ms 0 KB -