結果
問題 | No.482 あなたの名は |
ユーザー | ototonari |
提出日時 | 2017-03-21 01:32:43 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,322 bytes |
コンパイル時間 | 2,302 ms |
コンパイル使用メモリ | 104,948 KB |
実行使用メモリ | 45,396 KB |
最終ジャッジ日時 | 2023-09-18 13:39:56 |
合計ジャッジ時間 | 7,358 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 60 ms
25,320 KB |
testcase_01 | AC | 59 ms
18,720 KB |
testcase_02 | AC | 60 ms
20,836 KB |
testcase_03 | AC | 59 ms
20,952 KB |
testcase_04 | AC | 59 ms
20,772 KB |
testcase_05 | AC | 59 ms
20,908 KB |
testcase_06 | AC | 59 ms
20,708 KB |
testcase_07 | AC | 68 ms
20,992 KB |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | AC | 68 ms
20,976 KB |
testcase_11 | AC | 68 ms
22,992 KB |
testcase_12 | AC | 68 ms
21,084 KB |
testcase_13 | AC | 67 ms
23,072 KB |
testcase_14 | AC | 67 ms
20,976 KB |
testcase_15 | TLE | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
コンパイルメッセージ
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[] args) { string[] s = Console.ReadLine().Split(' '); string[] t = Console.ReadLine().Split(' '); long K = long.Parse(s[1]); long C = 0; long[] p = new long[long.Parse(s[0])]; for (int i = 0; i < t.Length; i++) p[i] = long.Parse(t[i]); for (int i = 0; i < p.Length; i++) { long min = p[i]; long index = 0; for (int j = i;j < p.Length; j++) { if(min > p[j]) { min = p[j]; index = j; } } if(p[i] != min) { long tmp = p[i]; p[i] = p[index]; p[index] = tmp; C++; } } if((K - C) % 2 == 0) { Console.WriteLine("{0}", "YES"); } else { Console.WriteLine("{0}", "NO"); } //Console.ReadLine(); } } }