QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#800599#853. Flat OrganizationMaMengQiAC ✓941ms19520kbC++141.5kb2024-12-06 13:15:352024-12-06 13:15:35

詳細信息

Test #1:

score: 100
Accepted
time: 0ms
memory: 3716kb

input:

1
5
0 1 0 6 11
0 0 1 6 12
2 0 0 7 12
0 0 0 0 4
0 0 0 0 0

output:

YES
2 10
2 4
4 5

result:

ok OK!

Test #2:

score: 0
Accepted
time: 11ms
memory: 3984kb

input:

100
5
0 1 0 6 11
0 0 1 6 12
2 0 0 7 12
0 0 0 0 4
0 0 0 0 0
1
0
2
0 0
7 0
2
0 1000000000
0 0
3
0 0 5
6 0 0
0 7 0
3
0 4 6
0 0 0
0 1 0
3
0 4 0
0 0 0
6 3 0
3
0 0 0
10 0 6
3 0 0
3
0 1999999998 1999999999
0 0 1999999998
0 0 0
50
0 105800 801 1800 64800 0 259200 288801 72201 12801 125000 20001 28801 33800 ...

output:

YES
2 10
2 4
4 5
YES
0 0
NO
NO
YES
0 0
YES
1 4
1 2
YES
1 3
3 2
YES
2 9
2 3
3 1
YES
1 1999999999
1 3
YES
3 602
4 33
11 47
34 39
YES
3 649
27 12
32 45
17 29
YES
5 1209
1 18
14 35
35 4
4 25
25 12
YES
3 844
3 8
1 41
14 21
YES
3 866
17 35
35 44
46 26
YES
4 1066
10 28
36 24
24 2
37 8
YES
3 1122
4 17
43 19...

result:

ok OK!

Test #3:

score: 0
Accepted
time: 85ms
memory: 4660kb

input:

50
200
0 40000001 47000001 35500000 37500501 0 0 0 26000000 29500501 0 22000501 6000000 33000000 0 73500000 68500501 50500500 32000000 12000001 0 0 49000000 0 67000500 70000000 5500500 60500001 0 28000001 35000500 31000001 0 36500001 69500000 57000001 65500000 63500000 0 64000500 51000001 56500000 6...

output:

YES
36 48002011
125 39
78 174
174 167
167 148
148 29
29 93
22 21
195 1
183 13
13 71
60 20
20 170
124 69
69 156
156 63
132 110
173 97
97 120
72 142
142 10
10 52
32 54
95 4
4 51
2 164
23 18
18 200
200 103
103 123
36 135
73 57
150 37
25 138
26 47
112 165
165 85
YES
30 42342994
114 109
146 162
79 29
72 ...

result:

ok OK!

Test #4:

score: 0
Accepted
time: 941ms
memory: 19396kb

input:

5
2000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

YES
2 1023134
1609 106
1628 1
YES
2 1792364
1445 1040
594 1232
YES
325 416316941
532 682
1692 1737
1737 414
1682 715
538 254
1850 1994
1994 73
914 688
1947 1566
1566 1177
519 10
203 1577
1330 721
1287 786
786 1686
1291 1918
1773 155
1936 1911
1911 1522
1119 584
584 656
1851 1250
1020 417
1830 189
18...

result:

ok OK!

Test #5:

score: 0
Accepted
time: 935ms
memory: 19480kb

input:

5
2000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...

output:

YES
533 996500000
1609 350
350 1146
1146 1154
1154 519
519 89
89 1715
1715 1620
1620 1313
1313 1492
1492 1787
1787 705
705 540
540 1878
1878 1708
1708 1216
1216 1496
1496 1822
1822 1622
1622 1448
1448 1001
1001 1009
1009 137
137 900
900 1571
1571 1306
1306 251
251 1114
1114 425
425 403
403 420
420 8...

result:

ok OK!

Test #6:

score: 0
Accepted
time: 927ms
memory: 19520kb

input:

5
2000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2289820 14688249 0 0 0 0 9856840 4321803 39208 583215 0 0 0 0 0 0 0 0 0 0 0 10857808 0 0 0 0 0 0 0 11712810 0 0 0 0 0 5848230 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 11045028 0 0 5712236 72208 9245030 0 0 0 0 0 0 0 10580003 18361832 0 0 20995247 0 24081817 0 0 0 27...

output:

YES
1999 449308
161 1784
1784 659
659 1794
1794 1490
1490 707
707 384
384 432
432 1643
1643 1850
1850 510
510 992
992 721
721 241
241 166
166 1518
1518 230
230 1254
1254 607
607 736
736 126
126 1262
1262 1929
1929 1499
1499 182
182 1803
1803 787
787 410
410 626
626 1856
1856 1406
1406 484
484 844
84...

result:

ok OK!

Test #7:

score: 0
Accepted
time: 925ms
memory: 19488kb

input:

5
2000
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 306240 4975575 0 0 0 0 2735274 794096 689 39371 0 0 0 0 0 0 0 0 0 0 0 3162279 0 0 0 0 0 0 0 3543126 0 0 0 0 0 1250019 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 3244419 0 0 1206671 1713 2484549 0 0 0 0 0 0 0 3041751 6954466 0 0 8503070 0 10445400 0 0 0 12655 512079 0 ...

output:

YES
999 6111
161 659
659 1490
1490 432
384 1643
1643 1850
1850 721
721 1518
1518 607
1254 126
126 1499
1499 182
182 410
410 1856
1856 1406
1406 844
844 203
203 1457
1457 1764
1764 1105
1105 286
286 1561
1993 1214
1214 1195
1195 1146
1146 1384
1384 944
944 485
485 36
36 1537
1401 118
118 1942
1942 29...

result:

ok OK!

Test #8:

score: 0
Accepted
time: 641ms
memory: 19516kb

input:

45
2000
0 0 0 7 0 7 0 0 0 0 0 0 0 0 0 7 0 0 0 7 7 0 0 7 0 0 0 0 0 0 0 0 0 0 0 0 7 0 0 0 7 0 0 0 7 7 0 0 0 7 7 7 7 0 7 0 0 7 0 0 0 0 0 7 7 0 0 0 7 7 7 7 0 7 0 0 0 7 0 7 0 0 7 0 0 0 0 0 0 0 7 7 7 0 7 7 0 7 7 0 0 0 0 7 0 0 0 0 0 7 7 7 0 0 7 0 0 0 7 0 7 0 0 0 7 0 0 0 0 7 7 0 0 7 0 0 0 0 0 7 0 7 0 0 0 7 ...

output:

YES
2 21
1851 621
1252 1655
YES
2 21
1184 518
518 1401
YES
2 21
87 164
164 65
YES
2 21
10 15
15 2
YES
2 21
16 20
6 15
YES
2 21
13 14
1 4
YES
2 21
1 10
10 13
YES
2 21
6 11
2 15
YES
2 21
15 12
12 11
YES
2 21
5 8
8 7
YES
2 21
9 13
13 2
YES
2 21
9 13
13 11
YES
2 21
2 6
6 5
YES
2 21
5 6
6 11
YES
2 21
13 ...

result:

ok OK!