結果

問題 No.69 文字を自由に並び替え
ユーザー kimnykimny
提出日時 2017-11-17 22:08:03
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 50 ms / 5,000 ms
コード長 729 bytes
コンパイル時間 3,158 ms
コンパイル使用メモリ 96,288 KB
実行使用メモリ 14,584 KB
最終ジャッジ日時 2023-08-20 23:53:43
合計ジャッジ時間 3,941 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 48 ms
14,372 KB
testcase_01 AC 47 ms
14,304 KB
testcase_02 AC 49 ms
14,580 KB
testcase_03 AC 49 ms
14,580 KB
testcase_04 AC 49 ms
14,512 KB
testcase_05 AC 49 ms
14,488 KB
testcase_06 AC 49 ms
14,456 KB
testcase_07 AC 50 ms
14,384 KB
testcase_08 AC 48 ms
14,348 KB
testcase_09 AC 49 ms
14,344 KB
testcase_10 AC 50 ms
14,584 KB
testcase_11 AC 48 ms
14,516 KB
testcase_12 AC 48 ms
14,516 KB
testcase_13 AC 48 ms
14,336 KB
testcase_14 AC 49 ms
14,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 yukicoder_69 {
    class Program {
        static void Main(string[] args) {
            char[] a = Console.ReadLine().ToCharArray();
            char[] b = Console.ReadLine().ToCharArray();
            Array.Sort(a);
            Array.Sort(b);
            int c = 0;
            for(int i = 0; i < a.Length; i++) {
                if (a[i] != b[i]) {
                    c++;
                }
            }
            if (c > 0) {
                Console.WriteLine("NO");
            } else {
                Console.WriteLine("YES");
            }
            Console.ReadLine();
        }
    }
}
0