結果
| 問題 |
No.2629 A replace B replace C
|
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2024-02-16 22:16:50 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 209 bytes |
| コンパイル時間 | 89 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 14,424 KB |
| 最終ジャッジ日時 | 2024-09-28 20:52:39 |
| 合計ジャッジ時間 | 5,156 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 5 |
| other | AC * 45 WA * 16 |
ソースコード
N=int(input())
S=list(input())
T=list(input())
for i in range(N-2,-1,-1):
if S[i]=="A" and S[i+1]=="B" and T[i+1]=="C":
S[i]="B"
S[i+1]="C"
if S==T:
print("Yes")
else:
print("No")
titia