結果
問題 |
No.204 ゴールデン・ウィーク(2)
|
ユーザー |
|
提出日時 | 2023-09-08 17:18:18 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 345 bytes |
コンパイル時間 | 1,498 ms |
コンパイル使用メモリ | 82,268 KB |
実行使用メモリ | 82,436 KB |
最終ジャッジ日時 | 2024-06-26 10:08:57 |
合計ジャッジ時間 | 3,314 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | WA * 5 TLE * 1 -- * 40 |
ソースコード
from itertools import permutations as perm d = int(input()) s = list(input() + input()) c = [] for i in range(14): if s[i] == 'x': c.append(i) ans = 0 for p in perm(c, d): for i in p: s[i] = 'o' i = 0 while i < 14: j = i while j < 14 and s[j] == 'o': j += 1 ans = max(ans, j - i) i = j + 1 for i in p: s[i] = 'x' print(ans)