結果
問題 | No.130 XOR Minimax |
ユーザー | NetSeed |
提出日時 | 2016-02-06 20:38:07 |
言語 | C#(csc) (csc 3.9.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 704 bytes |
コンパイル時間 | 925 ms |
コンパイル使用メモリ | 110,684 KB |
実行使用メモリ | 50,100 KB |
最終ジャッジ日時 | 2023-10-21 19:32:07 |
合計ジャッジ時間 | 5,029 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | AC | 32 ms
25,420 KB |
testcase_02 | AC | 33 ms
25,420 KB |
testcase_03 | AC | 33 ms
25,420 KB |
testcase_04 | AC | 192 ms
42,572 KB |
testcase_05 | AC | 225 ms
46,384 KB |
testcase_06 | AC | 207 ms
49,132 KB |
testcase_07 | WA | - |
testcase_08 | AC | 223 ms
49,972 KB |
testcase_09 | AC | 62 ms
27,404 KB |
testcase_10 | AC | 75 ms
28,860 KB |
testcase_11 | WA | - |
testcase_12 | AC | 49 ms
26,916 KB |
testcase_13 | AC | 146 ms
38,668 KB |
testcase_14 | AC | 181 ms
42,780 KB |
testcase_15 | AC | 39 ms
25,900 KB |
testcase_16 | AC | 139 ms
37,728 KB |
testcase_17 | AC | 143 ms
38,240 KB |
testcase_18 | AC | 151 ms
39,012 KB |
testcase_19 | AC | 173 ms
41,856 KB |
testcase_20 | AC | 102 ms
32,032 KB |
testcase_21 | AC | 181 ms
42,608 KB |
testcase_22 | WA | - |
testcase_23 | AC | 47 ms
26,864 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.Linq; namespace ConsoleApplication2 { class Program { static void Main(string[] args) { var mask = Enumerable.Range(0, 32).Select(x => (uint)1 << x).Reverse().ToArray(); Console.ReadLine(); var current = Console.ReadLine().Split().Select(x => uint.Parse(x)).ToArray(); uint[] candidate = new uint[0]; foreach (var m in mask) { var currentMax = current.Max(); candidate = current.Select(x => x ^ m).ToArray(); var candidateMax = candidate.Max(); //current = currentMax > candidateMax ? candidate : current; if (currentMax > candidateMax) { current = candidate; } } Console.WriteLine(current.Max()); } } }