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

20332번 - Divvying Up 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB159899092563.054%

문제

A solid competitive programming team can rack up a lot of prize money. Knowing how strong your team is, you are certain to win a lot of contests, so you had better sit down now and check that everybody will receive the same fair distribution of winnings.

You will participate in multiple contests, and at the end of each one receive a set amount of prize money. You can distribute any amount to each of the three members of your team each time, but by the end everyone must have the same amount of total winnings.

Can you distribute the winnings such that everyone gets an equal amount by the end?

입력

  • One line containing the number of contests, $n$ (1ドル \le n \le 10^4$).
  • One line containing the prize purse for each contest, $w_1 \ldots w_n$ (1ドル \le w \le 10^5$).

출력

Output yes if the winnings can be distributed equally between three contestants, otherwise no.

제한

예제 입력 1

2
10 3

예제 출력 1

no

예제 입력 2

3
9 8 7

예제 출력 2

yes

힌트

출처

ICPC > Regionals > Europe > Northwestern European Regional Contest > The UK & Ireland Programming Contest > UKIEPC 2020 D번

  • 문제를 만든 사람: Robin Lee
(追記) (追記ここまで)

출처

대학교 대회

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

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