All tasks
Easyloopsconditions

Positive, Negative and Zero

Time limit 2 s · Memory 64 MBAcceptance: —Solved by: 0

Statement

The first line contains n, the second line contains n integers. Print three numbers on one line separated by spaces: how many of them are positive, how many are negative and how many are zeros.

Examples

Example 1
Input
5
1 -2 0 3 -4
Output
2 2 1
Example 2
Input
3
0 0 0
Output
0 0 3

Constraints

  • 1 ≤ n ≤ 10^5
  • -10^9 ≤ a_i ≤ 10^9
Solve this task to unlock the editorial.

AI tutor

Stuck? Get a nudge — the tutor explains the idea, it never hands you the solution.