結果
| 問題 | No.130 XOR Minimax |
| コンテスト | |
| ユーザー |
bal4u
|
| 提出日時 | 2019-04-11 13:31:29 |
| 言語 | C(gnu17) (gcc 15.2.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 506 bytes |
| 記録 | |
| コンパイル時間 | 197 ms |
| コンパイル使用メモリ | 37,504 KB |
| 最終ジャッジ日時 | 2026-02-22 02:53:29 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 5 WA * 16 |
ソースコード
// yukicoder: No.130 XOR Minimax
// 2019.4.11 bal4u
#include <stdio.h>
#include <stdlib.h>
#if 1
#define gc() getchar_unlocked()
#else
#define gc() getchar()
#endif
int in()
{
int n = 0, c = gc();
do n = 10 * n + (c & 0xf), c = gc(); while (c >= '0');
return n;
}
int a[100005];
int main()
{
int i, N, x, t, ans;
x = (1 << 30) - 1, N = in();
for (i = 0; i < N; i++) x &= a[i] = in();
ans = 0;
for (i = 0; i < N; i++) {
if ((t = x ^ a[i]) > ans) ans = t;
}
printf("%d\n", ans);
return 0;
}
bal4u