結果
問題 |
No.1643 Not Substring
|
ユーザー |
![]() |
提出日時 | 2022-08-19 00:14:14 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 630 bytes |
コンパイル時間 | 439 ms |
コンパイル使用メモリ | 12,416 KB |
実行使用メモリ | 180,740 KB |
最終ジャッジ日時 | 2024-10-06 22:34:25 |
合計ジャッジ時間 | 3,970 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | TLE * 1 -- * 25 |
ソースコード
import sys sys.setrecursionlimit(10**6) moji=set() s=input() n=len(s) def cal(ind): if ''.join(t) in moji: return if ind == len(s): moji.add(''.join(t)) return moji.add(''.join(t)) for i in range(ind,len(s)): t.append(s[i]) cal(i+1) t.pop() for i in range(len(s)): t=[s[i]] cal(i+1) def cal(ind): if len(t) > n+1: return if ''.join(t) not in moji: print(''.join(t)) exit() for i in range(ind,123): t.append(chr(i)) cal(i) t.pop() for i in range(40): t=[chr(97+i)] cal(97+i)