#CCBCHBAHAI0000055. Bộ phân tích dãy số nguyên PHOJ (PHOJ Integer Sequence Analyzer)
Bộ phân tích dãy số nguyên PHOJ (PHOJ Integer Sequence Analyzer)
PHOJ Integer Sequence Analyzer (Bộ phân tích dãy số nguyên PHOJ)
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem
Given an integer array and a target , compute
the counts of negative, zero and positive elements,
and the target frequency
All indices are 0-based.
Input
The first line contains and . The second line contains integers .
Output
Line 1: . Line 2: m M. Line 3: N_- N_0 N_+. Line 4: p q f_x.
Subtask
Subtask 1 (20 points): , .
Subtask 2 (30 points): , .
Subtask 3 (50 points): , .
Example
Input
7 2
2 -1 5 0 5 -1 2
Output
12
-1 5
2 1 4
2 5 2
Explanation
The sample follows the definitions and rules above.