結果

問題 No.2339 Factorial Paths
ユーザー 沙耶花
提出日時 2023-06-02 22:40:41
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 920 bytes
コンパイル時間 4,225 ms
コンパイル使用メモリ 253,112 KB
最終ジャッジ日時 2025-02-13 19:37:11
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 4 WA * 13 RE * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <atcoder/all>
#include <bits/stdc++.h>
using namespace std;
using namespace atcoder;
using mint = modint998244353;
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define Inf32 1000000001
#define Inf64 4000000000000000001

int main(){
	
	int n;
	cin>>n;
	
	int sz = 2000;
	vector<string> S(sz,string(sz,'#'));
	int x = 0,y = 0;
	int cur = 1;
	
	while(n>1){
		rep(_,cur){
			if(n%2==1){
				int A = 1,B = n-1;
				rep(i,A+1){
					rep(j,B+1){
						S[x+i][y+j] = '.';
					}
				}
				x += A;
				y += B+1;
				n--;
			}
			int A = n/2,B = n/2;
			rep(i,A+1){
				rep(j,B+1){
					S[x+i][y+j] = '.';
				}
			}
			x += A;
			y += B+1;
		}
		cur *= 2;
		n /= 2;
	}
	//cout<<x<<' '<<y<<endl;
	//return 0;
	S[x][y] = '.';
	while(x!=sz-1){
		x++;
		S[x][y] = '.';
	}
	while(y!=sz-1){
		y++;
		S[x][y] = '.';
	}
	cout<<sz<<' '<<sz<<endl;
	rep(i,S.size()){
		cout<<S[i]<<endl;
	}
	
		
	
	return 0;
}
0