Submission #18031

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