結果

問題 No.1082 XORのXOR
ユーザー tentententen
提出日時 2020-08-19 09:15:51
言語 Java21
(openjdk 21)
結果
AC  
実行時間 250 ms / 2,000 ms
コード長 543 bytes
コンパイル時間 2,189 ms
コンパイル使用メモリ 74,216 KB
実行使用メモリ 44,196 KB
最終ジャッジ日時 2024-04-20 08:13:37
合計ジャッジ時間 10,510 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 132 ms
41,208 KB
testcase_01 AC 128 ms
41,480 KB
testcase_02 AC 131 ms
41,920 KB
testcase_03 AC 236 ms
43,980 KB
testcase_04 AC 222 ms
43,688 KB
testcase_05 AC 231 ms
43,676 KB
testcase_06 AC 238 ms
44,008 KB
testcase_07 AC 233 ms
43,692 KB
testcase_08 AC 239 ms
43,908 KB
testcase_09 AC 237 ms
43,920 KB
testcase_10 AC 236 ms
43,820 KB
testcase_11 AC 239 ms
43,712 KB
testcase_12 AC 250 ms
43,796 KB
testcase_13 AC 239 ms
43,664 KB
testcase_14 AC 237 ms
43,872 KB
testcase_15 AC 241 ms
43,816 KB
testcase_16 AC 236 ms
44,028 KB
testcase_17 AC 239 ms
43,740 KB
testcase_18 AC 237 ms
43,756 KB
testcase_19 AC 224 ms
43,628 KB
testcase_20 AC 240 ms
43,736 KB
testcase_21 AC 239 ms
44,196 KB
testcase_22 AC 237 ms
43,716 KB
testcase_23 AC 241 ms
43,908 KB
testcase_24 AC 234 ms
43,628 KB
testcase_25 AC 234 ms
43,728 KB
testcase_26 AC 234 ms
43,720 KB
testcase_27 AC 240 ms
43,776 KB
testcase_28 AC 134 ms
41,724 KB
testcase_29 AC 132 ms
41,796 KB
testcase_30 AC 134 ms
41,504 KB
testcase_31 AC 134 ms
41,392 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    static final int MOD = 1000000007;
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i] = sc.nextInt();
        }
        int max = 0;
        for (int i = 0; i < n - 1; i++) {
            for (int j = i + 1; j < n; j++) {
                max = Math.max(max, arr[i] ^ arr[j]);
            }
        }
        System.out.println(max);
    }
} 
0