Submission #20114

#TimeUsernameProblemLanguageResultExecution timeMemory
20114hongjun7카드 역배치 (KOI15_reversal)C++14
25 / 25
0 ms1084 KiB
#include <cstdio> #include <algorithm> using namespace std; int a[22], l, r; int main() { for (int i = 1; i <= 20; i++) a[i] = i; for (int i = 1; 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]); }
#Verdict Execution timeMemoryGrader output
Fetching results...