結果
| 問題 |
No.69 文字を自由に並び替え
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-06-15 21:13:27 |
| 言語 | OCaml (5.2.1) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 339 bytes |
| コンパイル時間 | 486 ms |
| コンパイル使用メモリ | 21,572 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-09 01:19:08 |
| 合計ジャッジ時間 | 1,062 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 15 |
ソースコード
Scanf.scanf "%s %s" (fun a b ->
let make_his s =
let n = String.length s in
let h = Array.make 26 0 in
for i = 0 to n - 1 do
let c = int_of_char s.[i] - 97 in
h.(c) <- h.(c) + 1
done;
h
in
print_endline @@
if make_his a = make_his b then "YES" else "NO"
)