TopCoder

abcabcabc
快去寫 TIOJ 2311 > <

User's AC Ratio

87.5% (49/56)

Submission's AC Ratio

32.0% (88/275)

Tags

Description

Input Format

Output Format

Sample Input 1

3 4
5 -2 3

Sample Output 1

3
2

Sample Input 2

3 3
5 -2 3

Sample Output 2

3
1

Sample Input 3

9 45
5 -1 2 -3 6 -9 7 3 2

Sample Output 3

-9
1

Hints

Problem Source

2023 TOI 初選
測資來源:TWPCA GitHub

Subtasks

No. Testdata Range Constraints Score
1 0~2 範例測資 0
2 0~12 $n\le 20$ 5
3 0~22 $n\le10 ^ 4 且 k \le 2 \times 10 ^ 5$ 5
4 23~32 $n\le10 ^ 4$ 5
5 33~42 $k \le 2\times 10 ^ 5$ 40
6 32~52 $-100 \le w_i \le 100$ 14
7 0~62 無額外限制 31

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 2000 1048576 65536 1 2 3 7
1 2000 1048576 65536 1 2 3 7
2 2000 1048576 65536 1 2 3 7
3 2000 1048576 65536 2 3 7
4 2000 1048576 65536 2 3 7
5 2000 1048576 65536 2 3 7
6 2000 1048576 65536 2 3 7
7 2000 1048576 65536 2 3 7
8 2000 1048576 65536 2 3 7
9 2000 1048576 65536 2 3 7
10 2000 1048576 65536 2 3 7
11 2000 1048576 65536 2 3 7
12 2000 1048576 65536 2 3 7
13 2000 1048576 65536 3 7
14 2000 1048576 65536 3 7
15 2000 1048576 65536 3 7
16 2000 1048576 65536 3 7
17 2000 1048576 65536 3 7
18 2000 1048576 65536 3 7
19 2000 1048576 65536 3 7
20 2000 1048576 65536 3 7
21 2000 1048576 65536 3 7
22 2000 1048576 65536 3 7
23 2000 1048576 65536 4 7
24 2000 1048576 65536 4 7
25 2000 1048576 65536 4 7
26 2000 1048576 65536 4 7
27 2000 1048576 65536 4 7
28 2000 1048576 65536 4 7
29 2000 1048576 65536 4 7
30 2000 1048576 65536 4 7
31 2000 1048576 65536 4 7
32 2000 1048576 65536 4 6 7
33 2000 1048576 65536 5 6 7
34 2000 1048576 65536 5 6 7
35 2000 1048576 65536 5 6 7
36 2000 1048576 65536 5 6 7
37 2000 1048576 65536 5 6 7
38 2000 1048576 65536 5 6 7
39 2000 1048576 65536 5 6 7
40 2000 1048576 65536 5 6 7
41 2000 1048576 65536 5 6 7
42 2000 1048576 65536 5 6 7
43 2000 1048576 65536 6 7
44 2000 1048576 65536 6 7
45 2000 1048576 65536 6 7
46 2000 1048576 65536 6 7
47 2000 1048576 65536 6 7
48 2000 1048576 65536 6 7
49 2000 1048576 65536 6 7
50 2000 1048576 65536 6 7
51 2000 1048576 65536 6 7
52 2000 1048576 65536 6 7
53 2000 1048576 65536 7
54 2000 1048576 65536 7
55 2000 1048576 65536 7
56 2000 1048576 65536 7
57 2000 1048576 65536 7
58 2000 1048576 65536 7
59 2000 1048576 65536 7
60 2000 1048576 65536 7
61 2000 1048576 65536 7
62 2000 1048576 65536 7