結果
| 問題 |
No.69 文字を自由に並び替え
|
| コンテスト | |
| ユーザー |
nobigomu
|
| 提出日時 | 2018-04-20 00:29:45 |
| 言語 | Lua (LuaJit 2.1.1734355927) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 409 bytes |
| コンパイル時間 | 149 ms |
| コンパイル使用メモリ | 5,248 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-06-27 13:58:09 |
| 合計ジャッジ時間 | 1,068 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 13 RE * 2 |
ソースコード
local ffi = require 'ffi'
local C = ffi.C
ffi.cdef [[
void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
]]
print((function (f, a, b)
return f(a) == f(b)
end)(function (s)
local t = ffi.new("char [?]", #s, s)
C.qsort(t, #s, 1, ffi.cast("int (*)(const char *, const char *)", function (a,b) return a[0]-b[0] end))
return ffi.string(t)
end, io.stdin:read("*l"), io.stdin:read("*l")))
nobigomu