結果
| 問題 |
No.38 赤青白ブロック
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-05-07 08:26:06 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 386 bytes |
| コンパイル時間 | 79 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 24,384 KB |
| 最終ジャッジ日時 | 2024-11-24 09:59:02 |
| 合計ジャッジ時間 | 169,126 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | TLE * 27 |
ソースコード
import sys input=lambda:sys.stdin.readline().rstrip() K=list(map(int,input().split())) S=[['R','B','W'].index(i) for i in input()] ans=0 for i in range(2**20): temp=i cur=[] for j in S: if j==2 or temp%2: cur.append(j) if j<2: temp//=2 flg=1 for j in range(2): for k in range(len(cur)-K[j]): if cur[k]==cur[k+K[j]]==j: flg=0 ans=max(ans,len(cur)*flg) print(ans)