Submission #18861

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