結果

問題 No.482 あなたの名は
ユーザー ototonariototonari
提出日時 2017-03-22 22:40:55
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 559 bytes
コンパイル時間 2,347 ms
コンパイル使用メモリ 101,728 KB
実行使用メモリ 41,312 KB
最終ジャッジ日時 2023-09-19 05:25:54
合計ジャッジ時間 8,109 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
20,792 KB
testcase_01 AC 58 ms
20,872 KB
testcase_02 AC 58 ms
20,708 KB
testcase_03 AC 58 ms
22,848 KB
testcase_04 AC 58 ms
20,812 KB
testcase_05 WA -
testcase_06 AC 59 ms
20,744 KB
testcase_07 AC 67 ms
22,920 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 67 ms
20,812 KB
testcase_11 AC 65 ms
21,072 KB
testcase_12 AC 66 ms
23,028 KB
testcase_13 AC 66 ms
22,928 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 128 ms
37,212 KB
testcase_17 AC 129 ms
37,164 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 128 ms
37,268 KB
testcase_25 AC 129 ms
39,228 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 135 ms
39,160 KB
testcase_29 AC 127 ms
37,172 KB
testcase_30 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

namespace yukicoder
{
    class Program
    {
        
        static void Main()
        {
            string[] s = Console.ReadLine().Split(' ');
            string[] t = Console.ReadLine().Split(' ');
            long K = long.Parse(s[1]);
            long C = 0;
            for (int i = 0; i < t.Length; i++)
            {
                if (long.Parse(t[i]) != i + 1) C++;
            }
            C /= 2;
            Console.WriteLine((K - C) % 2 == 0 ? "YES" : "NO");
            Console.ReadLine();
        }
    }

}
0