結果

問題 No.69 文字を自由に並び替え
ユーザー cccccc
提出日時 2022-07-22 14:31:56
言語 C#
(.NET 8.0.203)
結果
AC  
実行時間 49 ms / 5,000 ms
コード長 546 bytes
コンパイル時間 14,457 ms
コンパイル使用メモリ 146,280 KB
実行使用メモリ 161,540 KB
最終ジャッジ日時 2023-09-16 23:03:47
合計ジャッジ時間 16,063 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
27,056 KB
testcase_01 AC 45 ms
29,000 KB
testcase_02 AC 47 ms
29,476 KB
testcase_03 AC 48 ms
27,360 KB
testcase_04 AC 49 ms
27,472 KB
testcase_05 AC 48 ms
29,340 KB
testcase_06 AC 47 ms
29,376 KB
testcase_07 AC 46 ms
27,604 KB
testcase_08 AC 46 ms
27,268 KB
testcase_09 AC 47 ms
27,408 KB
testcase_10 AC 47 ms
27,544 KB
testcase_11 AC 45 ms
27,364 KB
testcase_12 AC 46 ms
27,468 KB
testcase_13 AC 47 ms
27,248 KB
testcase_14 AC 46 ms
161,540 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  Determining projects to restore...
  Restored /home/judge/data/code/main.csproj (in 111 ms).
.NET 向け Microsoft (R) Build Engine バージョン 17.0.0-preview-21470-01+cb055d28f
Copyright (C) Microsoft Corporation.All rights reserved.

  プレビュー版の .NET を使用しています。https://aka.ms/dotnet-core-preview をご覧ください
/home/judge/data/code/Main.cs(10,13): warning CS0219: 変数 'tmp' は割り当てられていますが、その値は使用されていません [/home/judge/data/code/main.csproj]
  main -> /home/judge/data/code/bin/Release/net6.0/main.dll
  main -> /home/judge/data/code/bin/Release/net6.0/publish/

ソースコード

diff #

using System;
using System.Linq;

class Program
{
    static void Main()
    {
        var inp = Console.ReadLine().ToArray();
        var chk = Console.ReadLine().ToArray();
        var tmp = "";

        // 配列要素をソートし順序を正す
        Array.Sort(inp);
        Array.Sort(chk);

        // 配列要素を比較する
        bool isEqual = inp.SequenceEqual(chk);

        if (isEqual)
        {
            Console.WriteLine("YES");
        }
        else
        {
            Console.WriteLine("NO");
        }
    }
}
0