結果
| 問題 |
No.52 よくある文字列の問題
|
| コンテスト | |
| ユーザー |
suppy193
|
| 提出日時 | 2017-02-06 14:39:37 |
| 言語 | Ruby (3.4.1) |
| 結果 |
AC
|
| 実行時間 | 92 ms / 5,000 ms |
| コード長 | 195 bytes |
| コンパイル時間 | 42 ms |
| コンパイル使用メモリ | 7,424 KB |
| 実行使用メモリ | 12,288 KB |
| 最終ジャッジ日時 | 2024-09-22 05:29:08 |
| 合計ジャッジ時間 | 1,689 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 |
コンパイルメッセージ
Syntax OK
ソースコード
s = gets.strip
@memo = []
def dfs(sub_str, s)
if s.length == 0
@memo << sub_str
return
end
dfs(sub_str + s[0], s[1..-1])
dfs(sub_str + s[-1], s[0..-2])
end
dfs("", s)
p @memo.uniq.length
suppy193