답안 #950467

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
950467 2024-03-20T10:36:25 Z pcc Costinland (info1cup19_costinland) C++17
71.589 / 100
1 ms 348 KB
#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define pll pair<ll,ll>
#define pii pair<int,int>
#define fs first
#define sc second
#define tlll tuple<ll,ll,ll>


int mxn = 61;
ll B = 59;
ll tar;

int main(){
	ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
	cin>>tar;
	if(tar<=19){
		mxn = 5;
		B = 3;
	}
	string arr[mxn];
	for(int i = 0;i<mxn;i++){
		arr[i] = string(mxn,'d');
	}
	for(int i = 0;i<B;i++){
		arr[i+1][i] = 'X';
	}
	for(int i = 0;i<B;i++){
		arr[i][i] = 'd';
		arr[i+2][i] = 'r';
	}
	for(int i = 0;i<mxn;i++){
		arr[0][i] = arr[mxn-1][i] = 'r';
	}
	for(int i = 0;i<mxn;i++)arr[i][mxn-1] = 'd';
	arr[mxn-1][mxn-1] = '.';
	int c = 0;
	tar--;
	for(int i = mxn-2;i>=0;i--){
		if((1ll<<c)&tar)arr[0][i] = 'X';
		c++;
	}
	cout<<mxn<<' '<<mxn<<'\n';
	if(tar == 16){
		for(int i = 0;i+1<mxn;i++)arr[0][i] = 'X';
		arr[1][mxn-2] = 'X';
	}
	if(tar == 17){
		for(int i = 0;i+1<mxn;i++)arr[0][i] = 'X';
		arr[1][mxn-2] = 'X';
		arr[2][mxn-2] = 'X';
	}
	if(tar == 18){
		for(int i = 0;i+1<mxn;i++)arr[0][i] = 'X';
		arr[1][mxn-2] = arr[1][mxn-3] = 'X';
	}
	for(int i = 0;i<mxn;i++){
		cout<<arr[i]<<'\n';
	}
	return 0;
}

# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Correct! Your size: 5
2 Correct 1 ms 348 KB Correct! Your size: 5
3 Correct 0 ms 348 KB Correct! Your size: 5
4 Correct 1 ms 348 KB Correct! Your size: 5
5 Correct 1 ms 348 KB Correct! Your size: 5
6 Correct 0 ms 344 KB Correct! Your size: 5
7 Correct 1 ms 348 KB Correct! Your size: 5
8 Correct 0 ms 348 KB Correct! Your size: 5
9 Correct 0 ms 348 KB Correct! Your size: 5
# 결과 실행 시간 메모리 Grader output
1 Partially correct 1 ms 348 KB Partially Correct! Your size: 61
2 Partially correct 0 ms 348 KB Partially Correct! Your size: 61
3 Partially correct 0 ms 344 KB Partially Correct! Your size: 61
4 Partially correct 0 ms 348 KB Partially Correct! Your size: 61
5 Partially correct 0 ms 348 KB Partially Correct! Your size: 61
6 Partially correct 1 ms 344 KB Partially Correct! Your size: 61
7 Partially correct 1 ms 348 KB Partially Correct! Your size: 61
8 Partially correct 0 ms 348 KB Partially Correct! Your size: 61