結果
問題 | No.1743 Permutation Code |
ユーザー |
|
提出日時 | 2022-10-29 02:28:08 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 622 bytes |
コンパイル時間 | 73 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 17,564 KB |
最終ジャッジ日時 | 2024-07-06 04:47:38 |
合計ジャッジ時間 | 13,362 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 2 TLE * 1 -- * 27 |
ソースコード
a=input() r=[0,0] s=set() while 1: r[-1]+=1 if r[-1]>len(a): del r[-1] s-={int(a[r[-2]:r[-1]],2)} continue if a[r[-1]:r[-1]+1]=='0': continue b=int(a[r[-2]:r[-1]],2) if b in s:#既出:次へ continue if r[-1]-r[-2]>16: del r[-1] s-={int(a[r[-2]:r[-1]],2)} continue if r[-1]==len(a): if s|{b}=={*range(1,len(s)+2)}: print(*[int(a[r[i]:r[i+1]],2)for i in range(len(r)-1)]) break else: del r[-1] s-={int(a[r[-2]:r[-1]],2)} continue s|={b} r+=[r[-1]]