結果

問題 No.1082 XORのXOR
ユーザー Yusei KatoYusei Kato
提出日時 2020-06-22 20:20:17
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 77 ms / 2,000 ms
コード長 1,033 bytes
コンパイル時間 2,402 ms
コンパイル使用メモリ 69,788 KB
実行使用メモリ 26,356 KB
最終ジャッジ日時 2023-09-16 19:22:02
合計ジャッジ時間 4,621 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
21,868 KB
testcase_01 AC 63 ms
23,912 KB
testcase_02 AC 60 ms
22,064 KB
testcase_03 AC 74 ms
22,280 KB
testcase_04 AC 73 ms
22,256 KB
testcase_05 AC 75 ms
22,292 KB
testcase_06 AC 74 ms
22,400 KB
testcase_07 AC 74 ms
22,268 KB
testcase_08 AC 74 ms
22,324 KB
testcase_09 AC 77 ms
20,136 KB
testcase_10 AC 74 ms
22,120 KB
testcase_11 AC 75 ms
26,356 KB
testcase_12 AC 71 ms
22,260 KB
testcase_13 AC 73 ms
22,184 KB
testcase_14 AC 73 ms
22,188 KB
testcase_15 AC 74 ms
26,276 KB
testcase_16 AC 73 ms
24,276 KB
testcase_17 AC 74 ms
22,248 KB
testcase_18 AC 75 ms
24,236 KB
testcase_19 AC 73 ms
22,368 KB
testcase_20 AC 73 ms
22,280 KB
testcase_21 AC 74 ms
22,188 KB
testcase_22 AC 74 ms
24,340 KB
testcase_23 AC 73 ms
20,336 KB
testcase_24 AC 74 ms
22,196 KB
testcase_25 AC 75 ms
24,224 KB
testcase_26 AC 74 ms
22,108 KB
testcase_27 AC 74 ms
22,188 KB
testcase_28 AC 62 ms
23,996 KB
testcase_29 AC 59 ms
23,932 KB
testcase_30 AC 60 ms
23,984 KB
testcase_31 AC 60 ms
21,836 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using System;
using System.Linq;

namespace Problem1082
{
    class Program
    {
        static void Main(string[] args)
        {
            int N = GetInt();
            var A = GetLongArray();
            long max = 0;

            for(int i = 0; i < N; i++)
            {
                for(int j = i + 1; j < N; j++)
                {
                    max = max < (A[i] ^ A[j]) ? A[i] ^ A[j] : max;
                }
            }

            Console.WriteLine(max);
        }

        public static int GetInt() => int.Parse(Console.ReadLine());
        public static int[] GetIntArray() => Console.ReadLine().Split().Select(int.Parse).ToArray();
        public static double GetDouble() => double.Parse(Console.ReadLine());
        public static double[] GetDoubleArray() => Console.ReadLine().Split().Select(double.Parse).ToArray();
        public static long GetLong() => long.Parse(Console.ReadLine());
        public static long[] GetLongArray() => Console.ReadLine().Split().Select(long.Parse).ToArray();

    }
}
0