結果
問題 | No.52 よくある文字列の問題 |
ユーザー |
![]() |
提出日時 | 2019-01-05 23:28:45 |
言語 | Nim (2.2.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 252 bytes |
コンパイル時間 | 3,018 ms |
コンパイル使用メモリ | 63,288 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-01 06:24:11 |
合計ジャッジ時間 | 4,528 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 |
コンパイルメッセージ
/home/judge/data/code/Main.nim(4, 15) Warning: Deprecated since v0.20, use 'initHashSet'; initSet is deprecated [Deprecated]
ソースコード
import sets let S = readLine stdin var sOutSet = initSet[string]() proc dfs(sIn, sOut: string) = if sIn == "": incl sOutSet, sOut return dfs(sIn[1 .. ^1], sOut & sIn[0]) dfs(sIn[0 .. ^2], sOut & sIn[^1]) dfs(S, "") echo sOutSet.len