TopCoder

nailong
垃圾 #pragma GCC target("avx,popcnt,sse4,abm") 我找 RE 找了一輩子 ==

User's AC Ratio

100.0% (3/3)

Submission's AC Ratio

55.6% (5/9)

Tags

Description

Input Format

Output Format

Sample Input 1

2
3 2
1 0

Sample Output 1

2 2
2 1
1 2
1 1

Sample Input 2

3
2 5 3
7 8 0
1 4 6

Sample Output 2

2 3
3 1
1 1
1 3
3 2
1 2
3 3
2 1
2 2

Hints

Problem Source

Subtasks

No. Testdata Range Constraints Score
1 0~1 範例測試資料 0
2 30 輸入滿足 $N = 1$。 5
3 0~9, 30 輸入滿足 $1 \le N \le 10$。 10
4 0~19, 30 輸入滿足 $1 \le N \le 100$。 20
5 0~30 無額外限制。 65

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 1000 65536 65536 1 3 4 5
1 1000 65536 65536 1 3 4 5
2 1000 65536 65536 3 4 5
3 1000 65536 65536 3 4 5
4 1000 65536 65536 3 4 5
5 1000 65536 65536 3 4 5
6 1000 65536 65536 3 4 5
7 1000 65536 65536 3 4 5
8 1000 65536 65536 3 4 5
9 1000 65536 65536 3 4 5
10 1000 65536 65536 4 5
11 1000 65536 65536 4 5
12 1000 65536 65536 4 5
13 1000 65536 65536 4 5
14 1000 65536 65536 4 5
15 1000 65536 65536 4 5
16 1000 65536 65536 4 5
17 1000 65536 65536 4 5
18 1000 65536 65536 4 5
19 1000 65536 65536 4 5
20 1000 65536 65536 5
21 1000 65536 65536 5
22 1000 65536 65536 5
23 1000 65536 65536 5
24 1000 65536 65536 5
25 1000 65536 65536 5
26 1000 65536 65536 5
27 1000 65536 65536 5
28 1000 65536 65536 5
29 1000 65536 65536 5
30 1000 65536 65536 2 3 4 5