結果
| 問題 | No.2629 A replace B replace C |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-02-16 22:29:11 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 246 bytes |
| 記録 | |
| コンパイル時間 | 251 ms |
| コンパイル使用メモリ | 85,300 KB |
| 実行使用メモリ | 55,500 KB |
| 最終ジャッジ日時 | 2026-04-15 09:25:04 |
| 合計ジャッジ時間 | 3,705 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 5 |
| other | AC * 44 WA * 17 |
ソースコード
N = int(input())
S = input()
T = input()
sa = S.count('A')
sb = S.count('B')
sc = S.count('C')
ta = T.count('A')
tb = T.count('B')
tc = T.count('C')
print("Yes" if sb == tb and sa >= ta and sa + ta == sc + tc and (sb if sa > ta else 1) else "No")