結果
| 問題 |
No.204 ゴールデン・ウィーク(2)
|
| コンテスト | |
| ユーザー |
rlangevin
|
| 提出日時 | 2023-01-09 22:51:44 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 502 bytes |
| コンパイル時間 | 202 ms |
| コンパイル使用メモリ | 82,392 KB |
| 実行使用メモリ | 54,544 KB |
| 最終ジャッジ日時 | 2024-12-18 00:21:28 |
| 合計ジャッジ時間 | 3,698 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 WA * 25 |
ソースコード
def calc(S):
cnt = 0
N = len(S)
ans = 0
for i in range(N):
if S[i] == "o":
cnt += 1
else:
ans = max(ans, cnt)
cnt = 0
return max(ans, cnt)
D = int(input())
C = []
C.extend(list(input()))
C.extend(list(input()))
N = len(C)
ans = 0
for i in range(N):
temp = [None] * N
for j in range(N):
if i <= j < i + D:
temp[j] = "o"
else:
temp[j] = C[j]
ans = max(ans, calc(temp))
print(ans)
rlangevin