結果
| 問題 | No.3526 Anti SKG |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-05-04 21:22:26 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 393 bytes |
| 記録 | |
| コンパイル時間 | 2,565 ms |
| コンパイル使用メモリ | 330,268 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-05-04 21:22:40 |
| 合計ジャッジ時間 | 6,507 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 17 WA * 13 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll=long long;
int main(){
cin.tie(nullptr);
ios::sync_with_stdio(false);
string t;
cin>>t;
int n=t.size();
if(t[0]=='.')t[0]='G';
for(int i=1;i<n;i++){
if(t[i]=='.')t[i]=t[i-1];
}
for(int i=0;i+3<=n;i++){
if(t[i]=='S'&&t[i+1]=='K'&&t[i+2]=='G'){
cout<<"No"<<endl;
return 0;
}
}
cout<<"Yes"<<endl;
cout<<t<<endl;
}