結果
問題 |
No.204 ゴールデン・ウィーク(2)
|
ユーザー |
![]() |
提出日時 | 2015-05-09 01:22:41 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 334 bytes |
コンパイル時間 | 277 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-10-13 12:06:14 |
合計ジャッジ時間 | 3,046 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 6 WA * 18 RE * 22 |
ソースコード
D = int(input()) C = input() + input() def goldenWeek(day): return 14 - ['o' * i in day for i in range(15)][::-1].index(True) ans = 0 for i in range(14): rec = 0 while C[i+rec] == 'x' and rec < D and i+rec < 14: rec += 1 if rec > 0: ans = max(ans, goldenWeek(C[:i] + 'o' * rec + C[i+rec])) print(ans)