結果

問題 No.1082 XORのXOR
ユーザー bluemeganebluemegane
提出日時 2021-04-22 13:16:34
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 73 ms / 2,000 ms
コード長 505 bytes
コンパイル時間 842 ms
コンパイル使用メモリ 63,624 KB
実行使用メモリ 23,032 KB
最終ジャッジ日時 2023-09-17 09:57:57
合計ジャッジ時間 4,235 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
18,628 KB
testcase_01 AC 58 ms
20,748 KB
testcase_02 AC 58 ms
20,724 KB
testcase_03 AC 72 ms
20,824 KB
testcase_04 AC 71 ms
18,968 KB
testcase_05 AC 70 ms
20,920 KB
testcase_06 AC 72 ms
23,004 KB
testcase_07 AC 71 ms
20,992 KB
testcase_08 AC 70 ms
22,972 KB
testcase_09 AC 71 ms
20,916 KB
testcase_10 AC 71 ms
20,916 KB
testcase_11 AC 71 ms
20,836 KB
testcase_12 AC 71 ms
20,996 KB
testcase_13 AC 71 ms
20,952 KB
testcase_14 AC 70 ms
18,872 KB
testcase_15 AC 70 ms
20,988 KB
testcase_16 AC 70 ms
20,980 KB
testcase_17 AC 71 ms
22,960 KB
testcase_18 AC 71 ms
23,032 KB
testcase_19 AC 71 ms
21,008 KB
testcase_20 AC 72 ms
20,984 KB
testcase_21 AC 71 ms
22,944 KB
testcase_22 AC 71 ms
20,932 KB
testcase_23 AC 71 ms
22,932 KB
testcase_24 AC 71 ms
22,972 KB
testcase_25 AC 73 ms
20,936 KB
testcase_26 AC 71 ms
23,012 KB
testcase_27 AC 71 ms
20,940 KB
testcase_28 AC 57 ms
20,724 KB
testcase_29 AC 57 ms
20,656 KB
testcase_30 AC 57 ms
20,820 KB
testcase_31 AC 58 ms
22,656 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

using static System.Math;
using System;

public class Hello
{
    static void Main()
    {
        var n = int.Parse(Console.ReadLine().Trim());
        string[] line = Console.ReadLine().Trim().Split(' ');
        var a = Array.ConvertAll(line, int.Parse);
        getAns(n, a);
    }
    static void getAns(int n, int[] a)
    {
        var ans = 0;
        for (int i = 0; i < n - 1; i++)
            for (int j = i + 1; j < n; j++) ans = Max(ans, a[i] ^ a[j]);
        Console.WriteLine(ans);
    }
}
0