結果
問題 |
No.437 cwwゲーム
|
ユーザー |
![]() |
提出日時 | 2016-10-29 01:13:53 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 718 ms / 2,000 ms |
コード長 | 268 bytes |
コンパイル時間 | 194 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-10-12 08:28:32 |
合計ジャッジ時間 | 4,777 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 41 |
ソースコード
s=input();l=len(s);r=enumerate def f(u,c): m=c for a,i in r(s): for b,j in r(s[a+1:],a+1): for d,k in r(s[b+1:],b+1): if i!='0'and j==k and i!=j and not(u[a]+u[b]+u[d]):u[a]=u[b]=u[d]=1;m=max(m,f(u,c+int(i+j+k)));u[a]=u[b]=u[d]=0 return m print(f([0]*l,0))