# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
869837 | rainboy | Costinland (info1cup19_costinland) | C11 | 1 ms | 424 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 49
int main() {
static char cc[N][N + 1];
int n, i, j;
long long k;
scanf("%lld", &k);
n = 0;
while (k >= 6) {
cc[n + 0][n + 0] = 'X', cc[n + 0][n + 1] = 'X', cc[n + 0][n + 2] = 'd';
cc[n + 1][n + 0] = 'X', cc[n + 1][n + 1] = 'X', cc[n + 1][n + 2] = 'd';
cc[n + 2][n + 0] = 'r', cc[n + 2][n + 1] = 'r', cc[n + 2][n + 2] = '.';
if (k / 3 % 2 == 1)
cc[n + 1][n + 2] = 'X';
if (k % 3 == 1)
cc[n + 0][n + 2] = 'X';
else if (k % 3 == 2)
cc[n + 0][n + 2] = 'X', cc[n + 2][n + 0] = 'X';
n += 2, k /= 6;
}
if (k == 1) {
cc[n + 0][n + 0] = 'r', cc[n + 0][n + 1] = 'd';
cc[n + 1][n + 0] = 'r', cc[n + 1][n + 1] = '.';
n++;
} else if (k == 2) {
cc[n + 0][n + 0] = 'X', cc[n + 0][n + 1] = 'd';
cc[n + 1][n + 0] = 'r', cc[n + 1][n + 1] = '.';
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |