結果

問題 No.130 XOR Minimax
ユーザー ki_ki33ki_ki33
提出日時 2015-01-17 00:17:05
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 1,319 bytes
コンパイル時間 2,142 ms
コンパイル使用メモリ 75,124 KB
実行使用メモリ 71,588 KB
最終ジャッジ日時 2023-09-04 14:56:51
合計ジャッジ時間 13,348 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 128 ms
56,100 KB
testcase_02 AC 129 ms
56,060 KB
testcase_03 AC 130 ms
55,956 KB
testcase_04 TLE -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedInputStream;
import java.io.IOException;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.*;
import java.util.Map.Entry;

public class Main {
	public static final int C =  1000000007;
	static final int CY = 1000000000;
	//static boolean MAP[][];
	static int N;
	static long M;
	static int MAX = -1;
	//static int tic[][];
	static int A[];
	//static int max;
	static int DP[][][];
	static int ST[][];
	//static int p[];
	//static ArrayList<HashSet<Integer>> al;
	static TreeMap<Integer, ArrayList<Integer>> hm;
	//static ArrayList<Integer> al;
	//static int a[][];
	//static char[][] ch;
	//static ArrayList<HashMap<Long, Long>> al;
	//static String a[];
	//static String str;

	public static void main(String[] args) {
		//StringBuilder sb = new StringBuilder();
		BufferedInputStream bs = new BufferedInputStream(System.in);
		Scanner sc = new Scanner(bs);
		
		N = sc.nextInt();
		
		A= new int[N];
		for (int i=0; i < N; i++) {
			A[i] = Integer.parseInt(sc.next());
			
		}
		
		

		
		//BigInteger bi = new BigInteger("0");
		
		long ans = Integer.MAX_VALUE;
		
		for (int i=0; i < N; i++){
			int max = 0;
			for (int t=0; t < N; t++) {
				max = Math.max(max, A[i] ^ A[t]);
				
			}
			ans = Math.min(ans, max);
		}
		
		
		System.out.println(ans);


	}
	

	

}
0