結果
| 問題 |
No.482 あなたの名は
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-03-22 22:40:55 |
| 言語 | C#(csc) (csc 3.9.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 559 bytes |
| コンパイル時間 | 772 ms |
| コンパイル使用メモリ | 103,808 KB |
| 実行使用メモリ | 34,304 KB |
| 最終ジャッジ日時 | 2024-07-05 17:48:19 |
| 合計ジャッジ時間 | 3,962 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 WA * 14 |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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();
}
}
}