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