# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
930926 | rainboy | 카드 역배치 (KOI15_reversal) | C11 | 0 ms | 420 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <stdio.h>
#define N 20
#define Q 10
int main() {
static int aa[N];
int h, i, l, r, tmp;
for (i = 0; i < N; i++)
aa[i] = i + 1;
for (h = 0; h < Q; h++) {
scanf("%d%d", &l, &r), l--, r--;
while (l < r) {
tmp = aa[l], aa[l] = aa[r], aa[r] = tmp;
l++, r--;
}
}
for (i = 0; i < N; i++)
printf("%d ", aa[i]);
printf("\n");
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |