結果
| 問題 |
No.69 文字を自由に並び替え
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-09-22 13:58:36 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
AC
|
| 実行時間 | 27 ms / 5,000 ms |
| コード長 | 689 bytes |
| コンパイル時間 | 1,124 ms |
| コンパイル使用メモリ | 103,296 KB |
| 実行使用メモリ | 18,560 KB |
| 最終ジャッジ日時 | 2024-07-08 05:37:56 |
| 合計ジャッジ時間 | 2,030 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 15 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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");
}
}
}
}