QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#27260#2808. Gardeningflower39 15ms3760kbC++113.4kb2022-04-09 13:36:092022-04-29 05:32:14

詳細信息

Subtask #1:

score: 5
Accepted

Test #1:

score: 5
Accepted
time: 15ms
memory: 3672kb

input:

28119
2 4 2
2 2 1
4 2 2
2 2 1
2 2 1
2 2 3
2 4 2
4 4 2
2 2 2
2 2 2
4 4 3
2 2 1
4 2 2
4 4 4
4 2 2
2 4 2
2 2 2
2 2 2
2 2 1
2 2 1
2 2 1
2 2 1
2 2 2
2 2 1
2 4 2
2 2 1
2 2 1
2 2 1
4 2 2
2 2 2
2 2 1
2 2 1
2 2 1
2 2 1
2 2 1
4 2 7
2 2 1
2 4 2
2 2 1
4 2 2
2 4 2
2 2 1
2 4 4
2 2 1
2 2 1
2 2 1
4 2 2
2 2 2
2 2 1
...

output:

YES
1 1 2 2
1 1 2 2
YES
1 1
1 1
YES
1 1
1 1
2 2
2 2
YES
1 1
1 1
YES
1 1
1 1
NO
YES
1 1 2 2
1 1 2 2
YES
1 1 1 1
1 2 2 1
1 2 2 1
1 1 1 1
NO
NO
NO
YES
1 1
1 1
YES
1 1
1 1
2 2
2 2
YES
1 1 2 2
1 1 2 2
3 3 4 4
3 3 4 4
YES
1 1
1 1
2 2
2 2
YES
1 1 2 2
1 1 2 2
NO
NO
YES
1 1
1 1
YES
1 1
1 1
YES
1 1
1 1
YES
1 ...

result:

ok Correct! Azusa and Laika like the garden :) (28119 test cases)

Subtask #2:

score: 6
Accepted

Dependency #1:

100%
Accepted

Test #2:

score: 6
Accepted
time: 5ms
memory: 3628kb

input:

2953
2 2 1
2 12 6
2 34 17
2 26 51
2 2 1
2 2 1
2 24 12
4 4 2
4 50 45
2 28 14
4 4 4
4 48 48
2 22 11
2 26 13
4 2 2
4 2 2
2 22 11
2 38 19
2 40 20
2 38 19
2 40 20
4 30 23
2 16 8
4 4 3
2 44 2
4 42 85
2 2 1
2 32 53
2 2 1
4 18 60
2 6 9
2 10 5
2 50 25
4 26 77
2 2 4
2 40 20
4 4 4
2 2 1
2 2 1
2 36 2
2 18 9
4 4...

output:

YES
1 1
1 1
YES
1 1 2 2 3 3 4 4 5 5 6 6
1 1 2 2 3 3 4 4 5 5 6 6
YES
1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17
1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17
NO
YES
1 1
1 1
YES
1 1
1 1
YES
1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9...

result:

ok Correct! Azusa and Laika like the garden :) (2953 test cases)

Test #3:

score: 0
Accepted
time: 7ms
memory: 3576kb

input:

2976
2 2 1
2 2 1
2 2 1
2 2 1
2 16 8
4 4 2
4 16 13
4 28 25
2 2 1
4 14 13
2 34 17
4 34 31
2 2 1
2 34 17
2 2 1
4 4 3
4 26 19
4 42 27
2 44 22
4 48 28
4 4 2
2 4 2
2 2 1
2 32 2
2 2 1
2 34 17
2 42 59
2 42 21
2 32 16
4 48 31
4 4 4
2 2 1
2 12 6
2 2 1
4 36 32
2 16 8
4 14 10
2 2 2
2 10 5
2 24 12
2 2 2
2 2 1
2 ...

output:

YES
1 1
1 1
YES
1 1
1 1
YES
1 1
1 1
YES
1 1
1 1
YES
1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8
1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8
YES
1 1 1 1
1 2 2 1
1 2 2 1
1 1 1 1
YES
1 1 1 1 1 1 2 2 3 3 4 4 5 5 6 6
1 7 7 8 8 1 2 2 3 3 4 4 5 5 6 6
1 7 7 8 8 1 9 9 10 10 11 11 12 12 13 13
1 1 1 1 1 1 9 9 10 10 11 11 12 12 13 13
...

result:

ok Correct! Azusa and Laika like the garden :) (2976 test cases)

Subtask #3:

score: 10
Accepted

Dependency #2:

100%
Accepted

Test #4:

score: 10
Accepted
time: 5ms
memory: 3656kb

input:

2175
2 2 1
2 2 1
2 30 15
4 4 2
4 48 28
6 36 27
2 2 1
2 32 16
2 18 9
2 44 22
2 34 17
2 20 10
4 4 4
2 36 2
4 8 5
4 6 6
4 40 23
4 18 12
2 44 22
2 46 23
4 38 9
4 4 4
6 6 7
2 50 67
2 30 15
4 4 3
2 46 23
4 46 40
4 28 26
2 6 3
4 4 4
6 46 47
4 24 13
2 12 6
2 2 2
2 30 15
6 6 9
2 2 2
2 44 22
4 44 43
4 20 9
4 ...

output:

YES
1 1
1 1
YES
1 1
1 1
YES
1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15
1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15
YES
1 1 1 1
1 2 2 1
1 2 2 1
1 1 1 1
YES
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 3 3 ...

result:

ok Correct! Azusa and Laika like the garden :) (2175 test cases)

Test #5:

score: 0
Accepted
time: 3ms
memory: 3584kb

input:

2190
2 2 2
2 38 2
4 4 3
2 16 8
2 6 3
4 4 8
2 34 17
4 26 22
6 10 11
2 40 2
2 16 31
2 32 16
6 10 5
4 28 94
2 42 21
6 26 34
6 50 74
2 2 1
6 40 43
2 22 11
4 30 30
6 20 29
4 4 4
6 36 37
2 18 9
4 4 13
2 2 1
6 40 43
4 18 48
2 2 1
2 38 19
2 22 11
4 38 38
4 12 11
4 4 3
2 2 1
6 22 23
2 30 15
2 30 15
4 4 3
4 4...

output:

NO
NO
NO
YES
1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8
1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8
YES
1 1 2 2 3 3
1 1 2 2 3 3
NO
YES
1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17
1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17
YES
1 1 1 1 1 1 1 1 ...

result:

ok Correct! Azusa and Laika like the garden :) (2190 test cases)

Subtask #4:

score: 18
Accepted

Test #6:

score: 18
Accepted
time: 10ms
memory: 3600kb

input:

311
2 2 1
12 12 14
6 6 6
40 40 297
28 28 82
30 30 74
4 4 10
38 38 210
6 6 4
42 42 365
8 8 11
16 16 30
6 6 7
22 22 38
10 10 5
2 2 2
12 12 19
16 16 52
28 28 124
26 26 92
2 2 2
28 28 25
20 20 19
18 18 43
4 4 3
30 30 78
26 26 130
18 18 58
26 26 59
6 6 4
10 10 6
14 14 34
18 18 184
12 12 108
18 18 35
30 3...

output:

YES
1 1
1 1
YES
1 1 1 1 1 1 1 1 1 1 1 1
1 2 2 2 2 2 2 2 2 2 2 1
1 2 3 3 3 3 4 4 5 5 2 1
1 2 3 6 6 3 4 4 5 5 2 1
1 2 3 6 6 3 7 7 8 8 2 1
1 2 3 9 9 3 7 7 8 8 2 1
1 2 3 9 9 3 10 10 11 11 2 1
1 2 3 12 12 3 10 10 11 11 2 1
1 2 3 12 12 3 13 13 14 14 2 1
1 2 3 3 3 3 13 13 14 14 2 1
1 2 2 2 2 2 2 2 2 2 2 1
...

result:

ok Correct! Azusa and Laika like the garden :) (311 test cases)

Test #7:

score: 0
Accepted
time: 9ms
memory: 3672kb

input:

297
2 2 1
6 6 33
24 24 491
36 36 198
10 10 11
8 8 6
10 10 17
4 4 3
36 36 716
26 26 80
20 20 146
4 4 3
2 2 1
28 28 284
10 10 14
2 2 1
18 18 20
4 4 3
12 12 35
14 14 19
4 4 3
22 22 113
38 38 20
44 44 377
18 18 24
34 34 247
16 16 9
8 8 11
8 8 63
22 22 94
16 16 24
26 26 145
8 8 16
16 16 31
18 18 26
10 10...

output:

YES
1 1
1 1
NO
NO
YES
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1
1 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 2 1
1 2 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 ...

result:

ok Correct! Azusa and Laika like the garden :) (297 test cases)

Test #8:

score: 0
Accepted
time: 9ms
memory: 3600kb

input:

307
2 2 2
28 28 15
16 16 245
8 8 10
42 42 225
34 34 119
8 8 10
10 10 8
18 18 317
12 12 22
20 20 26
14 14 7
20 20 76
32 32 15
16 16 31
4 4 4
14 14 26
16 16 11
24 24 21
20 20 382
8 8 56
28 28 91
20 20 45
18 18 15
2 2 2
2 2 1
12 12 7
40 40 319
14 14 8
10 10 6
26 26 130
14 14 28
8 8 39
16 16 41
18 18 70...

output:

NO
NO
NO
YES
1 1 1 1 1 1 1 1
1 2 2 3 3 4 4 1
1 2 2 3 3 4 4 1
1 5 5 6 6 7 7 1
1 5 5 6 6 7 7 1
1 8 8 9 9 10 10 1
1 8 8 9 9 10 10 1
1 1 1 1 1 1 1 1
YES
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2...

result:

ok Correct! Azusa and Laika like the garden :) (307 test cases)

Test #9:

score: 0
Accepted
time: 10ms
memory: 3596kb

input:

282
2 2 1
24 24 63
18 18 71
20 20 100
2 2 1
28 28 490
4 4 3
2 2 1
26 26 147
6 6 7
30 30 33
20 20 309
4 4 3
6 6 7
12 12 29
24 24 13
10 10 14
26 26 41
2 2 2
28 28 156
28 28 76
44 44 122
6 6 7
14 14 32
42 42 115
20 20 45
12 12 14
2 2 1
10 10 12
2 2 2
10 10 20
6 6 7
12 12 110
4 4 3
20 20 37
8 8 5
26 26 ...

output:

YES
1 1
1 1
YES
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1
1 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 2 1
1 2 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 3 2 1
1 2 3 4 5 5 5 5 6 6 7 7 8 8 9 9 10 10 11 11 4 3 2 1
1 2 3 4 5 12 12 5 6 6 7 7 8 8 9 9 10 10 ...

result:

ok Correct! Azusa and Laika like the garden :) (282 test cases)

Test #10:

score: 0
Accepted
time: 9ms
memory: 3700kb

input:

305
2 2 1
10 10 16
12 12 6
8 8 16
12 12 15
24 24 27
14 14 10
2 2 4
36 36 529
36 36 76
36 36 19
16 16 49
18 18 25
12 12 21
6 6 8
8 8 9
6 6 4
14 14 34
12 12 8
20 20 11
40 40 640
14 14 25
14 14 10
18 18 16
32 32 29
6 6 7
14 14 152
8 8 10
38 38 321
4 4 3
12 12 16
22 22 56
20 20 96
24 24 86
42 42 238
18 ...

output:

YES
1 1
1 1
YES
1 1 1 1 1 1 1 1 3 3
1 2 2 2 2 4 4 1 3 3
1 2 5 5 2 4 4 1 6 6
1 2 5 5 2 7 7 1 6 6
1 2 2 2 2 7 7 1 8 8
1 9 9 10 10 11 11 1 8 8
1 9 9 10 10 11 11 1 12 12
1 13 13 14 14 15 15 1 12 12
1 13 13 14 14 15 15 1 16 16
1 1 1 1 1 1 1 1 16 16
YES
1 1 1 1 1 1 1 1 1 1 1 1
1 2 2 2 2 2 2 2 2 2 2 1
1 2 ...

result:

ok Correct! Azusa and Laika like the garden :) (305 test cases)

Test #11:

score: 0
Accepted
time: 10ms
memory: 3704kb

input:

312
2 2 1
26 26 46
14 14 52
26 26 143
10 10 25
20 20 34
12 12 22
16 16 56
30 30 97
8 8 43
4 4 3
8 8 17
8 8 63
18 18 76
18 18 10
12 12 90
28 28 91
10 10 14
4 4 3
12 12 13
8 8 19
28 28 133
14 14 8
2 2 1
40 40 368
18 18 79
22 22 91
6 6 3
10 10 19
8 8 11
28 28 154
22 22 52
2 2 1
6 6 14
28 28 190
14 14 1...

output:

YES
1 1
1 1
YES
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1
1 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 2 1
1 2 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 3 2 1
1 2 3 4 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 4 3 2 1
1 2 3 4 5 6 6 6 6 6 6 6 ...

result:

ok Correct! Azusa and Laika like the garden :) (312 test cases)

Test #12:

score: 0
Accepted
time: 5ms
memory: 3608kb

input:

325
2 2 3
4 4 3
10 10 6
30 30 165
18 18 70
16 16 23
8 8 5
10 10 6
24 24 56
34 34 205
14 14 81
14 14 21
12 12 23
2 2 2
32 32 117
32 32 200
36 36 179
14 14 48
6 6 4
8 8 9
22 22 44
24 24 13
8 8 11
32 32 61
22 22 114
26 26 100
14 14 46
20 20 42
6 6 7
18 18 10
14 14 47
2 2 1
42 42 362
24 24 91
22 22 81
8...

output:

NO
NO
NO
YES
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1
1 2 3 3 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 2 1
1 2 3 15 15 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 2 1
1 2 3 15 15 3 16 16 17 17...

result:

ok Correct! Azusa and Laika like the garden :) (325 test cases)

Test #13:

score: 0
Accepted
time: 0ms
memory: 3704kb

input:

343
2 2 1
22 22 58
4 4 3
4 4 2
20 20 120
24 24 65
8 8 7
10 10 20
18 18 41
44 44 23
24 24 13
12 12 31
2 2 1
26 26 14
4 4 3
6 6 4
18 18 37
14 14 10
20 20 40
18 18 13
24 24 31
30 30 82
18 18 10
24 24 64
8 8 15
16 16 16
20 20 81
30 30 109
4 4 4
20 20 397
22 22 74
6 6 9
12 12 10
22 22 29
10 10 21
10 10 6...

output:

YES
1 1
1 1
YES
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1
1 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 2 1
1 2 3 4 4 4 4 4 4 5 5 6 6 7 7 8 8 9 9 3 2 1
1 2 3 4 10 10 11 11 4 5 5 6 6 7 7 8 8 9 9 3 2 1
1 2 3 4 10 10 11 11 4 12 12 13 13 14 14 15 15 16 16 3 2 1
1 ...

result:

ok Correct! Azusa and Laika like the garden :) (343 test cases)

Test #14:

score: 0
Accepted
time: 5ms
memory: 3760kb

input:

311
2 2 1
10 10 22
2 2 1
6 6 7
10 10 21
40 40 389
10 10 11
16 16 53
36 36 21
8 8 5
2 2 1
6 6 4
2 2 2
38 38 132
32 32 135
34 34 149
2 2 1
24 24 40
8 8 14
32 32 583
24 24 32
20 20 11
12 12 30
2 2 1
24 24 119
8 8 7
18 18 48
2 2 1
2 2 1
38 38 181
8 8 6
4 4 2
12 12 27
16 16 54
24 24 64
30 30 186
20 20 36...

output:

YES
1 1
1 1
YES
1 1 1 1 2 2 3 3 4 4
1 5 5 1 2 2 3 3 4 4
1 5 5 1 6 6 7 7 8 8
1 9 9 1 6 6 7 7 8 8
1 9 9 1 10 10 11 11 12 12
1 1 1 1 10 10 11 11 12 12
13 13 14 14 15 15 16 16 17 17
13 13 14 14 15 15 16 16 17 17
18 18 19 19 20 20 21 21 22 22
18 18 19 19 20 20 21 21 22 22
YES
1 1
1 1
YES
1 1 1 1 2 2
1 3 ...

result:

ok Correct! Azusa and Laika like the garden :) (311 test cases)

Test #15:

score: 0
Accepted
time: 9ms
memory: 3572kb

input:

303
2 2 2
4 4 3
26 26 81
38 38 267
46 46 440
4 4 3
22 22 12
12 12 36
14 14 41
44 44 367
20 20 94
20 20 47
38 38 294
18 18 70
28 28 175
10 10 20
42 42 183
4 4 3
20 20 68
6 6 29
10 10 19
16 16 15
36 36 19
2 2 1
16 16 14
28 28 92
30 30 274
2 2 1
26 26 192
24 24 27
4 4 2
2 2 2
16 16 9
2 2 1
14 14 48
18 ...

output:

NO
NO
YES
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1
1 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 2 1
1 2 3 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 3 2 1
1 2 3 4 5 5 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 4 3 2 1
1 2 3 4 5 13 13 5 6 6 7 ...

result:

ok Correct! Azusa and Laika like the garden :) (303 test cases)

Test #16:

score: 0
Accepted
time: 10ms
memory: 3600kb

input:

299
2 2 1
16 16 9
14 14 21
20 20 29
18 18 10
30 30 181
46 46 362
10 10 24
18 18 31
10 10 11
14 14 24
46 46 278
22 22 11
6 6 8
24 24 90
12 12 26
24 24 91
6 6 6
16 16 33
26 26 138
26 26 160
2 2 1
20 20 16
18 18 62
4 4 3
20 20 86
28 28 37
12 12 22
22 22 379
34 34 255
28 28 44
26 26 155
36 36 266
28 28 ...

output:

YES
1 1
1 1
NO
YES
1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 2 2 2 2 2 2 2 2 2 2 2 2 1
1 2 3 3 3 3 3 3 4 4 5 5 2 1
1 2 3 6 6 7 7 3 4 4 5 5 2 1
1 2 3 6 6 7 7 3 8 8 9 9 2 1
1 2 3 10 10 11 11 3 8 8 9 9 2 1
1 2 3 10 10 11 11 3 12 12 13 13 2 1
1 2 3 14 14 15 15 3 12 12 13 13 2 1
1 2 3 14 14 15 15 3 16 16 17 17 2 1
1...

result:

ok Correct! Azusa and Laika like the garden :) (299 test cases)

Test #17:

score: 0
Accepted
time: 8ms
memory: 3752kb

input:

326
2 2 1
2 2 1
24 24 106
32 32 226
4 4 2
16 16 113
12 12 36
2 2 1
14 14 41
4 4 11
8 8 5
24 24 17
10 10 22
8 8 16
32 32 164
26 26 14
2 2 1
6 6 6
6 6 4
6 6 4
16 16 43
26 26 41
26 26 77
12 12 30
6 6 5
20 20 98
36 36 501
8 8 15
12 12 26
20 20 65
26 26 64
10 10 15
20 20 11
10 10 6
16 16 50
6 6 6
12 12 2...

output:

YES
1 1
1 1
YES
1 1
1 1
YES
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 3 4 4 5 5 6 6 1
1 2 7 7 8 8 9 9 10 10 11 11 12 12 2 3 3 4 4 5 5 6 6 1
1 2 7 7 8 8 9 9 10 10 11 11 12 12 2 13 13 14 14 15 15 16 16 1
1 2 17 17 18 18 19 19 20 20 21 21 22 22 2 13 13 14 14 15 15 ...

result:

ok Correct! Azusa and Laika like the garden :) (326 test cases)

Test #18:

score: 0
Accepted
time: 0ms
memory: 3604kb

input:

327
2 2 2
8 8 14
22 22 12
18 18 62
2 2 1
28 28 117
32 32 252
6 6 4
44 44 426
40 40 80
22 22 107
10 10 11
2 2 3
10 10 41
2 2 1
4 4 2
14 14 8
20 20 11
12 12 12
2 2 1
2 2 1
8 8 13
26 26 126
6 6 7
26 26 130
6 6 9
4 4 3
16 16 39
4 4 3
28 28 60
40 40 312
2 2 1
16 16 49
16 16 63
14 14 163
12 12 18
10 10 19...

output:

NO
YES
1 1 1 1 2 2 3 3
1 4 4 1 2 2 3 3
1 4 4 1 5 5 6 6
1 1 1 1 5 5 6 6
7 7 8 8 9 9 10 10
7 7 8 8 9 9 10 10
11 11 12 12 13 13 14 14
11 11 12 12 13 13 14 14
NO
YES
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 2 2 2 2 3 3 4 4 5 5 6 6 7 7 8 8 1
1 2 9 9 2 3 3 4 4 5 5 6 6 7 7 8 8 1
1 2 9 9 2 10 10 11 11 12 12 13...

result:

ok Correct! Azusa and Laika like the garden :) (327 test cases)

Subtask #5:

score: 0
Runtime Error

Test #19:

score: 39
Accepted
time: 2ms
memory: 3596kb

input:

310
44 2 22
36 8 195
2 2 4
2 50 61
12 42 275
4 4 5
26 30 416
24 20 252
20 32 498
30 30 130
32 48 1153
46 16 574
4 40 89
6 28 64
10 16 9
18 42 152
4 14 1
6 50 280
10 10 87
44 24 395
2 2 4
40 46 273
34 34 607
22 22 300
40 40 1166
10 48 211
42 22 334
6 10 20
38 38 189
6 10 36
14 14 33
44 48 1518
32 18 ...

output:

YES
1 1
1 1
2 2
2 2
3 3
3 3
4 4
4 4
5 5
5 5
6 6
6 6
7 7
7 7
8 8
8 8
9 9
9 9
10 10
10 10
11 11
11 11
12 12
12 12
13 13
13 13
14 14
14 14
15 15
15 15
16 16
16 16
17 17
17 17
18 18
18 18
19 19
19 19
20 20
20 20
21 21
21 21
22 22
22 22
NO
NO
NO
NO
NO
NO
NO
NO
YES
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

ok Correct! Azusa and Laika like the garden :) (310 test cases)

Test #20:

score: -39
Runtime Error

input:

295
264 2 471
40 40 1025
34 48 847
4 4 14
14 40 439
24 42 319
2 2 4
12 12 40
44 14 346
46 10 209
22 22 407
44 24 338
34 30 275
12 4 36
22 22 248
20 14 215
10 10 32
20 20 319
30 30 539
18 18 45
20 20 312
18 40 142
30 30 582
12 22 246
26 46 847
24 32 258
24 36 253
20 20 161
32 18 514
4 44 18
36 36 855...

output:

NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1
1 2 3 3 3 3 4 4 5 5 6 6 7 7 8 8 2 1
1 2 3 9 9 3 4 4 5 5 6 6 7 7 8 8 2 1
1 2 3 9 9 3 10 10 11 11 12 12 13 13 14 14 2 1
1 2 3 15 15 3 10 10 11 11 12 12 13 13 14 14 2 1
1...

result:


Subtask #6:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Dependency #4:

100%
Accepted

Dependency #5:

0%