結果
| 問題 | No.2629 A replace B replace C |
| コンテスト | |
| ユーザー |
rlangevin
|
| 提出日時 | 2024-02-16 21:28:00 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 321 bytes |
| 記録 | |
| コンパイル時間 | 265 ms |
| コンパイル使用メモリ | 85,020 KB |
| 実行使用メモリ | 74,952 KB |
| 最終ジャッジ日時 | 2026-04-15 08:30:37 |
| 合計ジャッジ時間 | 4,192 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 5 |
| other | AC * 46 WA * 15 |
ソースコード
N = int(input())
S = list(input())
T = list(input())
s = [S.count("A"), S.count("B"), S.count("C")]
t = [T.count("A"), T.count("B"), T.count("C")]
if s[1] == 0:
if s == t:
print("Yes")
else:
print("No")
else:
if s[1] == t[1] and s[0] >= t[0]:
print("Yes")
else:
print("No")
rlangevin