結果
問題 | No.406 鴨等間隔の法則 |
ユーザー | funakoshi |
提出日時 | 2019-06-28 09:52:02 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,496 bytes |
コンパイル時間 | 2,728 ms |
コンパイル使用メモリ | 102,836 KB |
実行使用メモリ | 30,172 KB |
最終ジャッジ日時 | 2023-09-14 21:11:03 |
合計ジャッジ時間 | 7,434 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 87 ms
24,960 KB |
testcase_01 | AC | 57 ms
20,704 KB |
testcase_02 | AC | 58 ms
20,836 KB |
testcase_03 | AC | 58 ms
22,788 KB |
testcase_04 | AC | 116 ms
27,712 KB |
testcase_05 | AC | 84 ms
22,720 KB |
testcase_06 | AC | 85 ms
22,792 KB |
testcase_07 | AC | 84 ms
22,744 KB |
testcase_08 | AC | 115 ms
25,668 KB |
testcase_09 | AC | 121 ms
28,200 KB |
testcase_10 | AC | 87 ms
22,880 KB |
testcase_11 | AC | 109 ms
27,096 KB |
testcase_12 | AC | 93 ms
23,240 KB |
testcase_13 | AC | 91 ms
25,676 KB |
testcase_14 | WA | - |
testcase_15 | AC | 67 ms
23,344 KB |
testcase_16 | AC | 68 ms
21,408 KB |
testcase_17 | AC | 67 ms
21,288 KB |
testcase_18 | AC | 68 ms
21,352 KB |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | AC | 71 ms
21,704 KB |
testcase_22 | WA | - |
testcase_23 | AC | 94 ms
25,804 KB |
testcase_24 | WA | - |
testcase_25 | AC | 121 ms
28,152 KB |
testcase_26 | WA | - |
testcase_27 | AC | 110 ms
28,336 KB |
testcase_28 | AC | 117 ms
28,168 KB |
testcase_29 | WA | - |
testcase_30 | WA | - |
testcase_31 | AC | 118 ms
28,116 KB |
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace yukicoderTest { class Program { static void Main(string[] args) { string input = Console.ReadLine(); string[] input2 = Console.ReadLine().Split(' '); int n = int.Parse(input); int[] kamo = new int[input2.Length]; bool flg = true; for(int i=0;i<kamo.Length;i++) { kamo[i] = int.Parse(input2[i]); } Array.Sort(kamo); Array.Reverse(kamo); int sa = kamo[0] - kamo[1]; for (int i = 0; i < kamo.Length - 1; i++) { for (int j = i + 1; j < kamo.Length-1; j++) { if(kamo[i]==kamo[j]) { flg = false; break; } if(kamo[i]-kamo[j]!=sa) { flg = false; break; } } if(flg==false) { break; } } if(flg==true) { Console.WriteLine("YES"); } else { Console.WriteLine("NO"); } } } }