結果

問題 No.2339 Factorial Paths
ユーザー 沙耶花沙耶花
提出日時 2023-06-02 22:25:24
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 736 bytes
コンパイル時間 4,412 ms
コンパイル使用メモリ 260,472 KB
実行使用メモリ 7,692 KB
最終ジャッジ日時 2023-08-28 04:15:21
合計ジャッジ時間 14,459 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 AC 9 ms
7,364 KB
testcase_03 AC 9 ms
7,368 KB
testcase_04 AC 9 ms
7,412 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 10 ms
7,384 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
権限があれば一括ダウンロードができます

ソースコード

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){
		int A = n/2;
		int B = n-A;
		rep(_,cur){
			rep(i,A+1){
				rep(j,B+1){
					S[x+i][y+j] = '.';
				}
			}
			x += A;
			y += B+1;
		}
		cur *= 2;
		n = A;
	}
	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