結果
| 問題 |
No.204 ゴールデン・ウィーク(2)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-07-09 20:56:52 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 748 bytes |
| コンパイル時間 | 355 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-07-23 18:29:21 |
| 合計ジャッジ時間 | 3,600 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 15 WA * 31 |
ソースコード
# verification-helper: PROBLEM https://yukicoder.me/problems/no/204
from itertools import product
def main() -> None:
d = int(input())
c1 = input()
c2 = input()
s = c1 + c2
ans = 0
for i in range(14):
if i + d > 14:
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(14):
if p[i] == "o":
num += 1
else:
ans = max(ans, num)
num = 0
ans = max(ans, num)
print(ans)
if __name__ == "__main__":
main()