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

5235번 - Even Sum More Than Odd Sum 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB131292086772.552%

문제

When new programs arrive in the grid world, they start by playing the simplest of games in the Disc Arena against other novice programs. One of those games is played in front of a large board as follows: a sequence of numbers appears on the board, and the players have to decide whether the sum of even numbers in the sequence is larger than the sum of odd numbers in the sequence, or if they are equal. The first player to provide the correct answer wins the game, and the losers are deleted.

For example, given the sequence:

5 7 2 1 10 13 6 12

the sum of even numbers is 2 +たす 10 +たす 6 +たす 12 = 30, whereas the sum of odd numbers is 5 +たす 7 +たす 1 +たす 13 = 26. Hence the correct answer here is “EVEN”.

You are to help Sam (our protagonist) win this game so he can survive, and look for his father.

입력

The first line in the test data file contains the number of test cases (≤ 50). After that, each line contains one test case. The test case begins with the number of elements in the sequence, k (< 100), and then we have k numbers which specify the sequence. Assume all numbers are ≥ 0, and < 220.

출력

For each test case, you are to output “EVEN” (if the sum of even numbers in the sequence is larger than the sum of odd numbers), “ODD” (if the reverse is true), or “TIE” (if the two sums are identical).

제한

출력 형식

정확한 출력 형식은 제출에서 언어를 Java로 설정하면 확인할 수 있다.

예제 입력 1

4
8 5 7 2 1 10 13 6 12
4 5 2 3 4
8 1 2 1 2 1 1 1 1
6 1 1 2 3 5 8

예제 출력 1

EVEN
ODD
ODD
TIE

힌트

출처

School > University of Maryland High School Programming Contest > HSPC 2011 연습 세션 P1번

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

출처

대학교 대회

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

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