結果

問題 No.69 文字を自由に並び替え
ユーザー Hidetoshi KamataHidetoshi Kamata
提出日時 2022-05-06 16:21:59
言語 C#
(.NET 8.0.203)
結果
AC  
実行時間 50 ms / 5,000 ms
コード長 601 bytes
コンパイル時間 16,587 ms
コンパイル使用メモリ 144,140 KB
実行使用メモリ 162,344 KB
最終ジャッジ日時 2023-09-19 05:46:07
合計ジャッジ時間 18,379 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 45 ms
25,876 KB
testcase_01 AC 45 ms
26,248 KB
testcase_02 AC 49 ms
28,632 KB
testcase_03 AC 47 ms
26,376 KB
testcase_04 AC 49 ms
26,720 KB
testcase_05 AC 50 ms
26,636 KB
testcase_06 AC 48 ms
26,532 KB
testcase_07 AC 49 ms
26,616 KB
testcase_08 AC 49 ms
26,760 KB
testcase_09 AC 49 ms
28,680 KB
testcase_10 AC 49 ms
26,700 KB
testcase_11 AC 49 ms
26,644 KB
testcase_12 AC 50 ms
26,484 KB
testcase_13 AC 48 ms
26,408 KB
testcase_14 AC 49 ms
162,344 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  Determining projects to restore...
  Restored /home/judge/data/code/main.csproj (in 148 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 をご覧ください
  main -> /home/judge/data/code/bin/Release/net6.0/main.dll
  main -> /home/judge/data/code/bin/Release/net6.0/publish/

ソースコード

diff #

using System;

class Program
{
    static void Main(string[] args)
    {
        var a = Console.ReadLine();
        var b = Console.ReadLine();
        
        if (Check(a, b))
        {
            Console.WriteLine("YES");
        }
        else
        {
            Console.WriteLine("NO");
        }
    }
    
    static bool Check(string a, string b)
    {
        var aArrays = a.ToCharArray();
        var bArrays = b.ToCharArray();
        Array.Sort(aArrays);
        Array.Sort(bArrays);

        if (new string(aArrays) == new string(bArrays)) return true;
        return false;
    }
}
0