제출 #18033

#제출 시각아이디문제언어결과실행 시간메모리
18033gs14004카드 역배치 (KOI15_reversal)C++14
25 / 25
0 ms1720 KiB
#include <cstdio>
#include <iostream>
#include <cstring>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
typedef pair<int,int> pi;
int main(){
    int a[21];
    for(int i=1; i<=20; i++) a[i] = i;
    for(int i=0; i<10; i++){
        int aa, b;
        scanf("%d %d",&aa,&b);
        reverse(a+aa,a+b+1);
    }
    for(int i=1; i<=20; i++) printf("%d ",a[i]);
}
#Verdict Execution timeMemoryGrader output
Fetching results...