結果
問題 | No.130 XOR Minimax |
ユーザー | ki_ki33 |
提出日時 | 2015-01-17 00:13:24 |
言語 | Java21 (openjdk 21) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,302 bytes |
コンパイル時間 | 2,153 ms |
コンパイル使用メモリ | 76,352 KB |
実行使用メモリ | 125,064 KB |
最終ジャッジ日時 | 2023-09-04 14:56:05 |
合計ジャッジ時間 | 13,137 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | AC | 129 ms
55,472 KB |
testcase_02 | AC | 131 ms
55,896 KB |
testcase_03 | AC | 129 ms
55,580 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 | -- | - |
ソースコード
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] = sc.nextInt(); } //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); } }