結果

問題 No.69 文字を自由に並び替え
ユーザー UmekobuchachaUmekobuchacha
提出日時 2019-09-01 23:06:24
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 67 ms / 5,000 ms
コード長 1,124 bytes
コンパイル時間 2,197 ms
コンパイル使用メモリ 102,860 KB
実行使用メモリ 23,352 KB
最終ジャッジ日時 2023-08-19 22:41:55
合計ジャッジ時間 4,041 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
23,352 KB
testcase_01 AC 48 ms
22,548 KB
testcase_02 AC 64 ms
19,076 KB
testcase_03 AC 65 ms
21,108 KB
testcase_04 AC 64 ms
19,248 KB
testcase_05 AC 65 ms
23,116 KB
testcase_06 AC 64 ms
21,140 KB
testcase_07 AC 65 ms
21,244 KB
testcase_08 AC 66 ms
21,376 KB
testcase_09 AC 65 ms
19,080 KB
testcase_10 AC 48 ms
22,488 KB
testcase_11 AC 65 ms
21,136 KB
testcase_12 AC 67 ms
23,292 KB
testcase_13 AC 48 ms
20,500 KB
testcase_14 AC 48 ms
20,452 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;
namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
#if LocalDebug
            var exStdIn = new System.IO.StreamReader("stdin.txt");
            System.Console.SetIn(exStdIn);
#endif
            var Input1 = Console.ReadLine();
            var Input2 = Console.ReadLine();
            var Result = "YES";

            for (int i = 0; i < Input1.Length; i++)
            {
                var str = Input1[i].ToString();
                if (Input2.Contains(str))
                {
                    Input2 = Input2.Remove(Input2.IndexOf(str), 1);
                }
                else
                {
                    Result = "NO";
                    break;
                }
            }

            Console.WriteLine(Result);


#if LocalDebug
            System.Console.ReadKey();
#endif
        }


        static int GetData()
        {
            return int.Parse(Console.ReadLine());
        }

        static string[] GetList()
        {
            return Console.ReadLine().Split(' ');
        }



    }
}

0