답안 #950184

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
950184 2024-03-20T06:34:31 Z Pring Costinland (info1cup19_costinland) C++17
63.589 / 100
1 ms 464 KB
#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 & (1LL << 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;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Correct! Your size: 3
2 Correct 0 ms 348 KB Correct! Your size: 4
3 Correct 0 ms 348 KB Correct! Your size: 4
4 Correct 1 ms 348 KB Correct! Your size: 4
5 Correct 0 ms 348 KB Correct! Your size: 4
6 Correct 0 ms 348 KB Correct! Your size: 5
7 Correct 1 ms 348 KB Correct! Your size: 5
8 Correct 1 ms 348 KB Correct! Your size: 5
9 Partially correct 0 ms 348 KB Partially Correct! Your size: 6
# 결과 실행 시간 메모리 Grader output
1 Partially correct 0 ms 348 KB Partially Correct! Your size: 60
2 Partially correct 1 ms 348 KB Partially Correct! Your size: 60
3 Partially correct 0 ms 348 KB Partially Correct! Your size: 61
4 Partially correct 0 ms 464 KB Partially Correct! Your size: 61
5 Partially correct 1 ms 344 KB Partially Correct! Your size: 61
6 Partially correct 0 ms 348 KB Partially Correct! Your size: 61
7 Partially correct 0 ms 348 KB Partially Correct! Your size: 61
8 Partially correct 0 ms 460 KB Partially Correct! Your size: 59