# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1009234 | giorgi123glm | Costinland (info1cup19_costinland) | C++17 | 1 ms | 348 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 <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main () {
long long k = 0;
cin >> k;
long long Xos = 0;
for (long long i = 62; i >= 0; i--)
if ((k & (1ll << i))) {
Xos = i;
break;
}
long long n = max (Xos + 1ll, 5ll);
vector <vector <char> > gr (n, vector <char> (n, '.'));
for (int i = 0; i < Xos; i++)
gr[i][i] = 'X';
for (int i = 0; i < n - 1; i++) {
gr[i + 1][i] = 'r';
for (int y = i + 2; y < n; y++)
gr[y][i] = 'd';
gr[i][i + 1] = 'd';
for (int x = i + 2; x < n; x++)
gr[i][x] = 'r';
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |