結果
| 問題 | No.3526 Anti SKG |
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2026-05-04 21:26:49 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 464 bytes |
| 記録 | |
| コンパイル時間 | 753 ms |
| コンパイル使用メモリ | 20,824 KB |
| 実行使用メモリ | 17,116 KB |
| 最終ジャッジ日時 | 2026-05-04 21:26:59 |
| 合計ジャッジ時間 | 7,038 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 17 WA * 13 |
ソースコード
import sys
input = sys.stdin.readline
T=input().strip()
flag=0
for i in range(len(T)-3):
if T[i]=="S" and T[i+1]=="K" and T[i+2]=="G":
flag=1
if flag==1:
print("No")
else:
print("Yes")
ANS=[]
for s in T:
if s==".":
if len(ANS)>=2 and ANS[-1]=="K" and ANS[-2]=="S":
ANS.append("S")
else:
ANS.append("G")
else:
ANS.append(s)
print("".join(ANS))
titia