Logo
(追記) (追記ここまで)

21099번 - Four XOR 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 256 MB65637021449.883%

문제

Given a sequence $A_{1...n}$ of distinct integers, you need to answer whether there exist four indices $x, y, z, w$ such that 1ドル \le x < y < z < w \le n$ and $A_x \oplus A_y \oplus A_z \oplus A_w = 0$.

Recall that $x \oplus y$ means the bitwise exclusive-or between $x$ and $y,ドル sometimes expressed as $x \mathrm{xor} y$.

입력

The first line contains a single integer $n$ (4ドル \le n \le 10^5$).

The second line contains $n$ integers $A_{1...n}$ (0ドル \le A_i \le 10^5$). It is guaranteed that all $A_i$ are distinct.

출력

Output "Yes" if there are four indices satisfying the conditions, or "No" otherwise.

제한

예제 입력 1

5
1 2 3 4 5

예제 출력 1

Yes

예제 입력 2

5
1 2 4 8 16

예제 출력 2

No

예제 입력 3

5
1 3 4 8 9

예제 출력 3

No

힌트

출처

Camp > Petrozavodsk Programming Camp > Winter 2021 > Day 6: PKU Contest 2 E번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /