結果

問題 No.69 文字を自由に並び替え
ユーザー nak2yoshinak2yoshi
提出日時 2016-02-18 19:22:32
言語 D
(dmd 2.106.1)
結果
CE  
(最新)
AC  
(最初)
実行時間 -
コード長 254 bytes
コンパイル時間 299 ms
コンパイル使用メモリ 93,052 KB
最終ジャッジ日時 2024-04-27 02:17:36
合計ジャッジ時間 702 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。

コンパイルメッセージ
/home/linuxbrew/.linuxbrew/opt/dmd/include/dlang/dmd/std/algorithm/sorting.d(1936): Error: static assert:  "When using SwapStrategy.unstable, the passed Range 'char[]' must either fulfill hasSwappableElements, or hasAssignableElements, both were not the case"
Main.d(13):        instantiated from here: `sort!("a < b", SwapStrategy.unstable, char[])`

ソースコード

diff #

import std.stdio,
       std.conv,
       std.string,
       std.range,
       std.math,
       std.algorithm;

void main()
{
    auto A = readln.strip.to!(char[]);
    auto B = readln.strip.to!(char[]);

    (A.sort == B.sort ? "YES" : "NO").writeln;
}
0