#include <bits/stdc++.h>
using namespace std;
#define int long long
#define fs first
#define sc second
#define mp make_pai
#define FOR(i, j, k) for (int i = j, Z = k; i < Z; i++)
const int MXN = 70;
int x;
int n, m;
string s[MXN];
void miku() {
cin >> x;
m = __lg(x) + 1;
n = __lg(x) + 2;
FOR(i, 0, n) s[i] = string(m, '.');
FOR(i, 0, m - 1) {
s[i][i] = 'X';
s[i][i + 1] = 'd';
s[i + 1][i] = ((x & (1 << i)) ? 'X' : 'r');
s[n - 1][i] = 'r';
s[i][m - 1] = 'd';
}
s[m - 1][m - 1] = 'd';
cout << n << ' ' << m << '\n';
FOR(i, 0, n) cout << s[i] << '\n';
}
int32_t main() {
cin.tie(0) -> sync_with_stdio(false);
cin.exceptions(cin.failbit);
miku();
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Correct! Your size: 3 |
2 |
Correct |
0 ms |
344 KB |
Correct! Your size: 4 |
3 |
Correct |
1 ms |
348 KB |
Correct! Your size: 4 |
4 |
Correct |
0 ms |
348 KB |
Correct! Your size: 4 |
5 |
Correct |
1 ms |
344 KB |
Correct! Your size: 4 |
6 |
Correct |
0 ms |
348 KB |
Correct! Your size: 5 |
7 |
Correct |
0 ms |
348 KB |
Correct! Your size: 5 |
8 |
Correct |
0 ms |
348 KB |
Correct! Your size: 5 |
9 |
Partially correct |
0 ms |
348 KB |
Partially Correct! Your size: 6 |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
The matrix does not generate the required number of Costins |
2 |
Halted |
0 ms |
0 KB |
- |