結果

問題 No.69 文字を自由に並び替え
ユーザー ototonariototonari
提出日時 2017-03-17 02:50:08
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 886 bytes
コンパイル時間 1,990 ms
コンパイル使用メモリ 102,532 KB
実行使用メモリ 22,612 KB
最終ジャッジ日時 2023-09-09 21:12:49
合計ジャッジ時間 3,528 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 50 ms
20,680 KB
testcase_01 AC 50 ms
22,588 KB
testcase_02 AC 50 ms
22,572 KB
testcase_03 AC 49 ms
20,616 KB
testcase_04 WA -
testcase_05 AC 50 ms
20,612 KB
testcase_06 AC 51 ms
20,720 KB
testcase_07 AC 50 ms
20,540 KB
testcase_08 AC 50 ms
18,552 KB
testcase_09 AC 51 ms
22,564 KB
testcase_10 AC 51 ms
20,792 KB
testcase_11 AC 51 ms
20,608 KB
testcase_12 AC 51 ms
20,680 KB
testcase_13 AC 50 ms
22,612 KB
testcase_14 AC 50 ms
20,528 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 < y.Length; j++)
                {
                    if(x[j] == y[i])
                    {
                        f = 1;
                    }
                }
            }

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


        }

    }
}
0