結果

問題 No.2073 Concon Substrings (Swap Version)
ユーザー kyskys
提出日時 2022-09-16 21:58:20
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 923 bytes
コンパイル時間 558 ms
コンパイル使用メモリ 87,216 KB
実行使用メモリ 77,800 KB
最終ジャッジ日時 2023-08-23 15:26:28
合計ジャッジ時間 5,426 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
71,136 KB
testcase_01 AC 72 ms
70,732 KB
testcase_02 AC 73 ms
71,004 KB
testcase_03 AC 68 ms
70,888 KB
testcase_04 AC 68 ms
70,996 KB
testcase_05 AC 86 ms
77,688 KB
testcase_06 AC 93 ms
76,988 KB
testcase_07 AC 69 ms
70,908 KB
testcase_08 AC 83 ms
76,740 KB
testcase_09 AC 86 ms
76,912 KB
testcase_10 AC 95 ms
77,368 KB
testcase_11 AC 94 ms
77,240 KB
testcase_12 AC 69 ms
71,152 KB
testcase_13 AC 78 ms
75,728 KB
testcase_14 AC 92 ms
77,088 KB
testcase_15 AC 82 ms
76,632 KB
testcase_16 AC 85 ms
77,388 KB
testcase_17 AC 70 ms
71,104 KB
testcase_18 AC 72 ms
75,660 KB
testcase_19 AC 86 ms
77,248 KB
testcase_20 AC 83 ms
76,840 KB
testcase_21 AC 79 ms
76,336 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 #

def main():
    from sys import stdin, setrecursionlimit
    # setrecursionlimit(1000000)
    input = stdin.readline
    def iinput(): return int(input())
    def sinput(): return input().rstrip()
    def i0input(): return int(input()) - 1
    def linput(): return list(input().split())
    def liinput(): return list(map(int, input().split()))
    def miinput(): return map(int, input().split())
    def li0input(): return list(map(lambda x: int(x) - 1, input().split()))
    def mi0input(): return map(lambda x: int(x) - 1, input().split())
    INF = 1000000000000000000
    MOD = 1000000007

    N = iinput()
    S = sinput()

    ans = [[0] * 3 for _ in [0] * 3]
    con = 'con'
    for i in range(N * 3):
        c = S[i]
        try:
            j = con.index(c)
        except ValueError:
            continue
        ans[(i-j)%3][j%3] += 1
    # print(ans)
    print(min(ans[0]) + min(ans[1]) + min(ans[2]))

main()
0