結果
| 問題 |
No.2073 Concon Substrings (Swap Version)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-03-15 17:40:28 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 364 bytes |
| コンパイル時間 | 232 ms |
| コンパイル使用メモリ | 81,744 KB |
| 実行使用メモリ | 77,016 KB |
| 最終ジャッジ日時 | 2024-09-18 08:49:22 |
| 合計ジャッジ時間 | 4,521 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 5 |
| other | AC * 17 WA * 20 |
ソースコード
n = int(input())
s = input()
from collections import defaultdict
d0 = defaultdict(int)
d1 = defaultdict(int)
d2 = defaultdict(int)
for i in range(n):
d0[s[3*i]] += 1
d1[s[3*i+1]] += 1
d2[s[3*i+2]] += 1
ans = 0
l = ["c","o","n"]
ans += min(d0["c"],d1["o"],d2["n"])
ans += min(d0["n"],d1["c"],d2["o"])
ans += min(d0["o"],d1["n"],d2["c"])
print(ans)