結果
問題 |
No.204 ゴールデン・ウィーク(2)
|
ユーザー |
|
提出日時 | 2023-07-09 21:14:38 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 740 bytes |
コンパイル時間 | 462 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-07-23 18:48:41 |
合計ジャッジ時間 | 3,664 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 35 WA * 11 |
ソースコード
# verification-helper: PROBLEM https://yukicoder.me/problems/no/204 def main() -> None: d = int(input()) c1 = input() c2 = input() s = "x" * 14 + c1 + c2 + "x" * 14 ans = 0 for i in range(30): if i + d > 42: continue p = [i for i in s] cnt = 0 for j in range(d): if p[i + j] == "x": cnt += 1 p[i + j] = "o" if cnt <= d: num = 0 for i in range(42): if p[i] == "o": num += 1 else: ans = max(ans, num) num = 0 ans = max(ans, num) print(ans) if __name__ == "__main__": main()