結果
問題 |
No.2339 Factorial Paths
|
ユーザー |
![]() |
提出日時 | 2023-06-02 22:25:24 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 736 bytes |
コンパイル時間 | 3,726 ms |
コンパイル使用メモリ | 252,284 KB |
最終ジャッジ日時 | 2025-02-13 19:02:39 |
ジャッジサーバーID (参考情報) |
judge3 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 2 |
other | AC * 3 WA * 17 |
ソースコード
#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; }