結果

問題 No.69 文字を自由に並び替え
ユーザー No
提出日時 2015-04-21 17:26:11
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 27 ms / 5,000 ms
コード長 693 bytes
コンパイル時間 2,498 ms
コンパイル使用メモリ 104,960 KB
実行使用メモリ 18,688 KB
最終ジャッジ日時 2024-12-14 05:51:45
合計ジャッジ時間 3,582 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 15
権限があれば一括ダウンロードができます
コンパイルメッセージ
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