結果

問題 No.482 あなたの名は
ユーザー ototonariototonari
提出日時 2017-03-22 22:54:55
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 713 bytes
コンパイル時間 2,194 ms
コンパイル使用メモリ 105,828 KB
実行使用メモリ 41,316 KB
最終ジャッジ日時 2023-09-19 05:26:36
合計ジャッジ時間 6,907 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
20,560 KB
testcase_01 AC 57 ms
20,652 KB
testcase_02 AC 56 ms
20,612 KB
testcase_03 AC 57 ms
22,620 KB
testcase_04 AC 56 ms
20,732 KB
testcase_05 AC 56 ms
22,788 KB
testcase_06 AC 56 ms
20,728 KB
testcase_07 AC 65 ms
20,856 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 65 ms
22,968 KB
testcase_11 WA -
testcase_12 AC 65 ms
22,932 KB
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 127 ms
37,244 KB
testcase_17 AC 128 ms
37,212 KB
testcase_18 WA -
testcase_19 AC 129 ms
37,140 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 129 ms
37,184 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 133 ms
37,148 KB
testcase_29 AC 126 ms
39,108 KB
testcase_30 AC 56 ms
20,728 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
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++;
            }
            if(C != 0 && C % 3 == 0)
            {
                C = (C / 2) + 1;
            }
            else
            {
                C /= 2;
            }
            Console.WriteLine((K - C) % 2 == 0 ? "YES" : "NO");
            Console.ReadLine();
        }
    }

}
0