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

21860번 - XorSum 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 512 MB488896119.741%

문제

You are given an array V, consisting of N integers V1, V2, …, VN.

Your task is to find the result of XOR (1 ≤ i ≤ j ≤ N) (Vi + Vj).

입력

The first line contains integer N – the size of the array. The second line contains N space-separated integers V1, V2, …, VN.

출력

The first line contains the required answer.

제한

  • 1 ≤ N ≤ 106
  • 1 ≤ Vi ≤ 5 × 108

예제 입력 1

4
3 9 6 6

예제 출력 1

20

힌트

  • (1 , 1) : 3 + 3 = 6
  • (1 , 2) : 3 + 9 = 12
  • (1 , 3) : 3 + 6 = 9
  • (1 , 4) : 3 + 6 = 9
  • (2 , 2) : 9 + 9 = 18
  • (2 , 3) : 9 + 6 = 15
  • (2 , 4) : 9 + 6 = 15
  • (3 , 3) : 6 + 6 = 12
  • (3 , 4) : 6 + 6 = 12
  • (4 , 4) : 6 + 6 = 12
  • 6 ^ 12 ^ 9 ^ 9 ^ 18 ^ 15 ^ 15 ^ 12 ^ 12 ^ 12 = 20

출처

Contest > infO(1) Cup > infO(1) Cup 2017 International Round 2번

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

출처

대학교 대회

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

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