結果

問題 No.69 文字を自由に並び替え
ユーザー ototonariototonari
提出日時 2017-03-17 03:07:27
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 1,002 bytes
コンパイル時間 2,780 ms
コンパイル使用メモリ 99,404 KB
実行使用メモリ 22,844 KB
最終ジャッジ日時 2023-09-09 21:13:00
合計ジャッジ時間 3,453 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 51 ms
22,628 KB
testcase_01 AC 51 ms
22,624 KB
testcase_02 AC 50 ms
20,612 KB
testcase_03 AC 50 ms
20,560 KB
testcase_04 AC 51 ms
20,580 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 50 ms
20,556 KB
testcase_09 AC 50 ms
22,620 KB
testcase_10 AC 50 ms
20,568 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 50 ms
22,588 KB
testcase_14 AC 49 ms
20,500 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
{
    class Program
    {
        static void Main(string[] args)
        {
            string x = Console.ReadLine();
            string y = Console.ReadLine();
            int f = 1;
            for(int i = 0; i < y.Length && f == 1; i++)
            {
                f = 0;
                for (int j =0;j < x.Length; j = j+1)
                {
                    if(x[j] == y[i])
                    {
                        x = x.Remove(j, 1);
                        j = j - 1;
                        f = 1;
                    }
                }
            }

            if (f == 1)
            {
                Console.WriteLine("{0}", "YES");
            }
            else
            {
                Console.WriteLine("{0}", "NO");
            }
            Console.ReadLine();

        }

    }
}
0