답안 #544662

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
544662 2022-04-02T14:17:22 Z pokmui9909 카드 역배치 (KOI15_reversal) C++17
25 / 25
1 ms 328 KB
#include <bits/stdc++.h>
using namespace std;
using ll = long long;

ll A[25] = {};

int main(){
    cin.tie(0) -> sync_with_stdio(false);

    for(int i = 1; i <= 20; i++){
        A[i] = i;
    }
    for(int i = 1; i <= 10; i++){
        ll L, R; cin >> L >> R;
        reverse(A + L, A + R + 1);
    }
    for(int i = 1; i <= 20; i++){
        cout << A[i] << ' ';
    }
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 1 ms 212 KB Output is correct
5 Correct 1 ms 212 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 324 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
9 Correct 1 ms 212 KB Output is correct
10 Correct 1 ms 212 KB Output is correct
11 Correct 1 ms 212 KB Output is correct
12 Correct 0 ms 212 KB Output is correct
13 Correct 1 ms 212 KB Output is correct
14 Correct 1 ms 212 KB Output is correct
15 Correct 1 ms 324 KB Output is correct
16 Correct 1 ms 328 KB Output is correct
17 Correct 0 ms 212 KB Output is correct
18 Correct 1 ms 212 KB Output is correct
19 Correct 1 ms 320 KB Output is correct
20 Correct 1 ms 328 KB Output is correct