結果
| 問題 | No.3731 Kaleidoscope |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-09-19 15:28:17 |
| 言語 | C++23 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 2 ms / 2,000 ms |
| + 771µs | |
| コード長 | 928 bytes |
| 記録 | |
| コンパイル時間 | 2,418 ms |
| コンパイル使用メモリ | 338,388 KB |
| 実行使用メモリ | 10,028 KB |
| 最終ジャッジ日時 | 2026-09-19 15:28:32 |
| 合計ジャッジ時間 | 6,173 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 31 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
using ll=long long;
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
string T;
cin>>T;
int M=1023;
vector<string> S(M,string(M,'#'));
cout<<M<<"\n";
for(int i=0;i<M;i++){
S[i][M-1]=S[M-1][i]='.';
}
S[0][0]='.';
int y=0,x=0,z=0;
int N=T.size();
vector<int> dd={0,1,0};
int c=0;
while(1){
y+=dd[z/2];
x+=dd[z/2+1];
if(z%2==1){
if(T[c]=='o'){
int ny=y;
int nx=x;
while(1){
ny+=dd[z/2];
nx+=dd[z/2+1];
if(ny>=M||nx>=M)break;
S[ny][nx]='.';
}
}
c++;
}
z++;
z%=4;
if(y>=M||x>=M)break;
S[y][x]='.';
}
for(int i=0;i<M;i++){
cout<<S[i]<<"\n";
}
}