結果

問題 No.3731 Kaleidoscope
コンテスト
ユーザー akua
提出日時 2026-09-28 23:16:31
言語 C++17
(gcc 15.3.0 + boost 1.92.0 + ACL)
コンパイル:
g++-15 -O2 -lm -std=c++17 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
WA  
実行時間 -
コード長 1,219 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 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
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#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);
}

0