結果

問題 No.2073 Concon Substrings (Swap Version)
ユーザー sepa38sepa38
提出日時 2023-03-15 16:49:40
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 281 bytes
コンパイル時間 214 ms
コンパイル使用メモリ 81,836 KB
実行使用メモリ 111,444 KB
最終ジャッジ日時 2023-10-18 12:27:32
合計ジャッジ時間 5,975 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,428 KB
testcase_01 AC 37 ms
53,428 KB
testcase_02 AC 38 ms
53,428 KB
testcase_03 AC 38 ms
53,428 KB
testcase_04 AC 38 ms
53,428 KB
testcase_05 AC 112 ms
109,760 KB
testcase_06 AC 112 ms
109,760 KB
testcase_07 AC 37 ms
53,428 KB
testcase_08 AC 93 ms
111,248 KB
testcase_09 AC 99 ms
111,252 KB
testcase_10 AC 117 ms
109,760 KB
testcase_11 AC 117 ms
109,764 KB
testcase_12 AC 37 ms
53,428 KB
testcase_13 AC 45 ms
64,612 KB
testcase_14 AC 108 ms
111,128 KB
testcase_15 AC 59 ms
78,440 KB
testcase_16 AC 111 ms
109,756 KB
testcase_17 AC 38 ms
53,428 KB
testcase_18 AC 45 ms
64,612 KB
testcase_19 AC 110 ms
109,812 KB
testcase_20 AC 97 ms
111,140 KB
testcase_21 AC 78 ms
98,476 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import permutations
n = int(input())
s = input()
ls = [[] for _ in range(3)]
for i in range(n*3):
  ls[i%3].append(s[i])
ans = 0
con = "con"
for i in range(3):
  res = 1 << 30
  for j in range(3):
    res = min(res, ls[(i+j)%3].count(con[j]))
  ans += res
print(ans)
0