# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
508677 | rainboy | 회전 (JOI12_rotate) | C11 | 2055 ms | 6080 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 2000
int main() {
static char cc[N][N + 1], cc_[N][N + 1];
int n, q, i, j, i_, j_;
scanf("%d%d", &n, &q);
for (i = 0; i < n; i++)
scanf("%s", cc[i]);
while (q--) {
int l;
scanf("%d%d%d", &i, &j, &l), i--, j--;
for (i_ = 0; i_ < l; i_++)
for (j_ = 0; j_ < l; j_++)
cc_[i + l - 1 - j_][j + i_] = cc[i + i_][j + j_];
for (i_ = 0; i_ < l; i_++)
for (j_ = 0; j_ < l; j_++)
cc[i + i_][j + j_] = cc_[i + i_][j + j_];
}
for (i = 0; i < n; i++)
printf("%s\n", cc[i]);
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |