結果

問題 No.204 ゴールデン・ウィーク(2)
ユーザー cormorancormoran
提出日時 2016-08-16 21:32:49
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 20 ms / 1,000 ms
コード長 395 bytes
コンパイル時間 496 ms
コンパイル使用メモリ 10,544 KB
実行使用メモリ 8,496 KB
最終ジャッジ日時 2023-08-25 23:51:42
合計ジャッジ時間 3,066 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
8,432 KB
testcase_01 AC 18 ms
8,468 KB
testcase_02 AC 19 ms
8,376 KB
testcase_03 AC 19 ms
8,316 KB
testcase_04 AC 19 ms
8,420 KB
testcase_05 AC 20 ms
8,356 KB
testcase_06 AC 18 ms
8,496 KB
testcase_07 AC 20 ms
8,316 KB
testcase_08 AC 18 ms
8,320 KB
testcase_09 AC 19 ms
8,388 KB
testcase_10 AC 18 ms
8,412 KB
testcase_11 AC 19 ms
8,328 KB
testcase_12 AC 18 ms
8,376 KB
testcase_13 AC 19 ms
8,468 KB
testcase_14 AC 19 ms
8,384 KB
testcase_15 AC 19 ms
8,356 KB
testcase_16 AC 19 ms
8,284 KB
testcase_17 AC 18 ms
8,384 KB
testcase_18 AC 19 ms
8,492 KB
testcase_19 AC 19 ms
8,460 KB
testcase_20 AC 19 ms
8,468 KB
testcase_21 AC 19 ms
8,384 KB
testcase_22 AC 19 ms
8,428 KB
testcase_23 AC 19 ms
8,292 KB
testcase_24 AC 19 ms
8,336 KB
testcase_25 AC 19 ms
8,384 KB
testcase_26 AC 19 ms
8,460 KB
testcase_27 AC 18 ms
8,312 KB
testcase_28 AC 19 ms
8,336 KB
testcase_29 AC 19 ms
8,316 KB
testcase_30 AC 19 ms
8,248 KB
testcase_31 AC 19 ms
8,248 KB
testcase_32 AC 19 ms
8,300 KB
testcase_33 AC 19 ms
8,460 KB
testcase_34 AC 19 ms
8,484 KB
testcase_35 AC 19 ms
8,476 KB
testcase_36 AC 19 ms
8,356 KB
testcase_37 AC 20 ms
8,248 KB
testcase_38 AC 20 ms
8,312 KB
testcase_39 AC 20 ms
8,356 KB
testcase_40 AC 19 ms
8,356 KB
testcase_41 AC 19 ms
8,496 KB
testcase_42 AC 19 ms
8,380 KB
testcase_43 AC 18 ms
8,472 KB
testcase_44 AC 18 ms
8,420 KB
testcase_45 AC 18 ms
8,312 KB
testcase_46 AC 19 ms
8,352 KB
testcase_47 AC 19 ms
8,376 KB
testcase_48 AC 19 ms
8,248 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
import copy

n = int(input())
days = 'x' * 20 + input() + input() + 'x' * 20

ans = 0

for i in range(len(days)):
    day2 = list(copy.copy(days))
    for j in range(n):
        if i + j < len(day2):
            if day2[i + j] == 'o':
                break
            day2[i + j] = 'o'
    ans = max(ans, max(map(lambda x: len(x), "".join(day2).split('x'))))

print(ans)
0