結果

問題 No.69 文字を自由に並び替え
ユーザー NoNo
提出日時 2015-04-21 17:26:11
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 57 ms / 5,000 ms
コード長 693 bytes
コンパイル時間 4,780 ms
コンパイル使用メモリ 101,644 KB
実行使用メモリ 25,396 KB
最終ジャッジ日時 2023-08-20 22:48:34
合計ジャッジ時間 3,764 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 53 ms
21,492 KB
testcase_01 AC 53 ms
21,432 KB
testcase_02 AC 55 ms
21,444 KB
testcase_03 AC 56 ms
23,448 KB
testcase_04 AC 55 ms
21,348 KB
testcase_05 AC 55 ms
21,396 KB
testcase_06 AC 55 ms
21,396 KB
testcase_07 AC 56 ms
23,452 KB
testcase_08 AC 55 ms
23,484 KB
testcase_09 AC 56 ms
21,320 KB
testcase_10 AC 56 ms
21,404 KB
testcase_11 AC 57 ms
21,400 KB
testcase_12 AC 56 ms
23,468 KB
testcase_13 AC 56 ms
23,432 KB
testcase_14 AC 56 ms
25,396 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ForYukicoder
{
    class Program
    {
        static void Main(string[] args)
        {
            char[] A = Console.ReadLine().ToArray();
            char[] B = Console.ReadLine().ToArray();
            bool isMatch = true;

            Array.Sort(A);
            Array.Sort(B);

            for (int i = 0; i < A.Length; i++)
            {
                if (A[i] != B[i])
                {
                    isMatch = false;
                    break;
                }
            }

            Console.WriteLine(isMatch ? "YES" : "NO");
        }
    }
}
0