結果

問題 No.69 文字を自由に並び替え
ユーザー te-shte-sh
提出日時 2016-08-27 16:01:08
言語 D
(dmd 2.107.1)
結果
CE  
(最新)
AC  
(最初)
実行時間 -
コード長 242 bytes
コンパイル時間 242 ms
コンパイル使用メモリ 80,000 KB
最終ジャッジ日時 2023-09-02 21:27:01
合計ジャッジ時間 758 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)
コンパイルエラー時のメッセージ・ソースコードは、提出者また管理者しか表示できないようにしております。(リジャッジ後のコンパイルエラーは公開されます)
ただし、clay言語の場合は開発者のデバッグのため、公開されます。

コンパイルメッセージ
Main.d(11): Error: none of the overloads of template `std.algorithm.sorting.sort` are callable using argument types `!()(char[])`
/dmd2/linux/bin64/../../src/phobos/std/algorithm/sorting.d(1925):        Candidate is: `sort(alias less = "a < b", SwapStrategy ss = SwapStrategy.unstable, Range)(Range r)`
  with `less = "a < b",
       ss = SwapStrategy.unstable,
       Range = char[]`
  must satisfy one of the following constraints:
`       hasSwappableElements!Range
       hasAssignableElements!Range
       ss != SwapStrategy.unstable`
Main.d(11): Error: none of the overloads of template `std.algorithm.sorting.sort` are callable using argument types `!()(char[])`
/dmd2/linux/bin64/../../src/phobos/std/algorithm/sorting.d(1925):        Candidate is: `sort(alias less = "a < b", SwapStrategy ss = SwapStrategy.unstable, Range)(Range r)`
  with `less = "a < b",
       ss = SwapStrategy.unstable,
       Range = char[]`
  must satisfy one of the following constraints:
`       hasSwappableElements!Range
       hasAssignableElements!Range
       ss != SwapStrategy.unstable`

ソースコード

diff #

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

void main()
{
  auto a = readln.chomp.dup;
  auto b = readln.chomp.dup;

  writeln(a.sort == b.sort ? "YES" : "NO");
}
0