Submission #18095

#TimeUsernameProblemLanguageResultExecution timeMemory
18095comet카드 역배치 (KOI15_reversal)C++98
25 / 25
0 ms1084 KiB
#include <cstdio> #include <algorithm> using namespace std; int a[21],L,R; int main(){ for(int i=1;i<=20;i++){ a[i]=i; } for(int i=0;i<10;i++){ scanf("%d%d",&L,&R); reverse(a+L,a+R+1); } for(int i=1;i<=20;i++){ printf("%d ",a[i]); } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...