All submissions for this problem are available.
Read problems statements in Mandarin Chinese and Russian as well.
Given an array consisting of N integers, you have to do the following operation K times.
- Find out the sum of all the elements in the array. Denote it by S. Insert an integer in the array strictly greater than S. Hence, size of the array will increase by one.
Thus, at the end of the K operations, the array will have N + K elements. Find out the smallest possible value of the last number inserted in the array. Since this number can be very large, you just have to tell whether it will be odd or even.
- The first line of each test file contains the number of test cases, T.
- The description of the test cases follows this line. Each test case description consists of 2 lines.
- The first line has the values of N and K, separated by a space.
- The next line contains a single-space separated list of values of the elements in the array.
- For each test case, output a single line containing the answer to the problem.If the number is even print "even" and if the number is odd print "odd".
- 1 ≤ T ≤10
- 1 ≤ K ≤ 106
- 1 ≤ N ≤ 103
- 1 ≤ array element ≤ 109
Sample Input: 1 2 3 5 7
|Tags||basic-prog, cakewalk, code_note, cook59, simulation|
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.5, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, SCM chicken, CLOJ, FS|
Fetching successful submissions
If you are still having problems, see a sample solution here.