AAAA 1 P1 - Even-Odd Sort

View as PDF

Submit solution


Points: 7 (partial)
Time limit: 1.0s
Memory limit: 1G

Author:
Problem types

Thanks to his teacher, Todd, Steven finally understands even and odd numbers! To test his knowledge, Todd will play a game with Steven:

The game begins with a list of N integers, a_1, a_2, \dots, a_N, and a variable x initially set to 0.

With Steven going first, they will alternate turns picking and removing any integer k from the list and updating the variable x to either x+k or x \times k.

The game ends when there are no more integers in the list. Steven wins if the final value of x is even, while Todd wins if it is odd.

If both players play optimally, who will win? Output Steven if Steven will win, and Todd otherwise.

Constraints

1 \le N \le 10^6
1 \le a_i \le 10^9

Subtask 1 [50%]

All a_i are odd.

Subtask 2 [50%]

No additional constraints.

Input Specification

The first line will contain one integer, N, the number of integers in the starting list.

The next line will contain N space-separated integers, a_1, a_2, \dots, a_N, the integers in the starting list.

Output Specification

Output Steven if Steven will win, and Todd otherwise.

Sample Input 1

2
1 3

Sample Output 1

Todd

Sample Input 2

3
2 3 4

Sample Output 2

Steven

Comments

There are no comments at the moment.