結果
| 問題 | No.2073 Concon Substrings (Swap Version) |
| コンテスト | |
| ユーザー |
H20
|
| 提出日時 | 2022-09-16 22:52:35 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 271 bytes |
| 記録 | |
| コンパイル時間 | 361 ms |
| コンパイル使用メモリ | 85,888 KB |
| 実行使用メモリ | 109,728 KB |
| 最終ジャッジ日時 | 2026-05-28 10:35:15 |
| 合計ジャッジ時間 | 4,692 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 5 |
| other | AC * 25 WA * 12 |
ソースコード
import collections
N = int(input())
S = list(input())
C = [collections.Counter() for _ in range(3)]
for i,c in enumerate(S):
C[i%3][c]+=1
print(min(C[0]['c'],C[1]['o'],C[2]['n'])+min(N-1,min(C[0]['o'],C[1]['n'],C[2]['c']))+min(N-1,min(C[0]['n'],C[1]['c'],C[2]['o'])))
H20