結果

問題 No.69 文字を自由に並び替え
ユーザー k-a-rgbk-a-rgb
提出日時 2023-09-22 13:58:36
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 53 ms / 5,000 ms
コード長 689 bytes
コンパイル時間 3,913 ms
コンパイル使用メモリ 106,060 KB
実行使用メモリ 23,408 KB
最終ジャッジ日時 2023-09-22 13:58:42
合計ジャッジ時間 3,878 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 51 ms
23,380 KB
testcase_01 AC 50 ms
21,284 KB
testcase_02 AC 52 ms
23,248 KB
testcase_03 AC 51 ms
23,380 KB
testcase_04 AC 51 ms
21,368 KB
testcase_05 AC 51 ms
23,376 KB
testcase_06 AC 51 ms
21,260 KB
testcase_07 AC 50 ms
21,344 KB
testcase_08 AC 50 ms
21,360 KB
testcase_09 AC 52 ms
23,244 KB
testcase_10 AC 51 ms
23,408 KB
testcase_11 AC 51 ms
21,280 KB
testcase_12 AC 51 ms
21,320 KB
testcase_13 AC 53 ms
21,268 KB
testcase_14 AC 51 ms
21,316 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;

namespace PracticeAtCoder
{
    class Program
    {
        static void Main(string[] args)
        {
			
			
			//069文字入れ替え
			
			
			// mm/60 をhに加算 h%24をhに格納 mm%60をmmに代入
			
			string sA = Console.ReadLine();
			char[] chaA = sA.ToCharArray();
			Array.Sort(chaA);
			
			string sB = Console.ReadLine();
			char[] chaB = sB.ToCharArray();
			Array.Sort(chaB);
			
			bool resA = chaA.SequenceEqual(chaB);
			
			//一位を見つけて配列から削除するアルゴ
			if(resA){
				Console.WriteLine("YES");
			}else{
				Console.WriteLine("NO");	
			}
			
		}
    }
}
0