結果
問題 | No.1082 XORのXOR |
ユーザー |
![]() |
提出日時 | 2020-06-19 21:23:54 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 19 ms / 2,000 ms |
コード長 | 267 bytes |
コンパイル時間 | 260 ms |
コンパイル使用メモリ | 26,624 KB |
最終ジャッジ日時 | 2025-01-11 05:38:50 |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 29 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:7:15: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 7 | scanf ("%d", &N); | ~~~~~~^~~~~~~~~~ main.cpp:8:43: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 8 | for (int i = 0; i < N; i++) scanf ("%d", &A[i]); | ~~~~~~^~~~~~~~~~~~~
ソースコード
#include <stdio.h>int N, A[2020];int main(){scanf ("%d", &N);for (int i = 0; i < N; i++) scanf ("%d", &A[i]);int x = 0;for (int i = 0; i < N; i++) for (int j = i + 1; j < N; j++) if (x < (A[i] ^ A[j])) x = A[i] ^ A[j];printf ("%d\n", x);return 0;}