結果
| 問題 | No.3731 Kaleidoscope |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-09-28 23:16:31 |
| 言語 | C++17 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 1,219 bytes |
| 記録 | |
| コンパイル時間 | 1,139 ms |
| コンパイル使用メモリ | 219,960 KB |
| 実行使用メモリ | 9,920 KB |
| 最終ジャッジ日時 | 2026-09-28 23:16:38 |
| 合計ジャッジ時間 | 5,709 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 5 WA * 26 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i,n) for(ll i=0; i<(ll)(n); i++)
#define repi(i,a,b) for(ll i=(ll)(a); i<(ll)(b); i++)
#define all(v) (v).begin(),(v).end()
using vi=vector<int>;
using vvi=vector<vi>;
using vll=vector<ll>;
using vvll=vector<vll>;
const ll inf=2e18;
template<typename T,typename S> bool chmin(T& a,const S&b){
return a>b? a=b,1:0;
}
template<typename T,typename S> bool chmax(T& a,const S&b){
return a<b? a=b,1:0;
}
void solve(int test){
string s; cin >> s;
int N=1<<10;
//N=20;
s='@'+s;
vvi ans(N+1,vi(N+1,-1));
ans[1][1]=0;
for(int i=2; i<=N; i++){
ans[i][i-1]=0;
ans[i][i]=0;
repi(j,1,i-1)ans[i][j]=1;
}
repi(i,1,N+1){
if(i>=s.size() || s[i]=='o'){
repi(j,i+1,N)ans[i][j]=0;
}
else {
repi(j,i+1,N)ans[i][j]=1;
}
ans[i][N]=0;
}
cout << N << endl;
string out=".#";
repi(i,1,N+1){
repi(j,1,N+1){
cout << out[ans[i][j]];
}
cout << endl;
}
}
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
int t=1; //cin >> t;
rep(test,t)solve(test);
}