QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#130815#857. Social DistancingL_G_JAC ✓939ms11184kbC++233.1kb2023-07-25 11:03:542023-07-25 11:03:55

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 1ms
memory: 3712kb

input:

2
5
1 2
1 3
2 4
2 5
2
1 4
1 5
7
1 2
2 3
2 4
4 6
6 5
6 7
3
1 4 5
3 4 7

output:

YES
4
1 3
4 2
2 5
3 1
NO

result:

ok OK!

Test #2:

score: 0
Accepted
time: 453ms
memory: 3588kb

input:

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

output:

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

result:

ok OK!

Test #3:

score: 0
Accepted
time: 125ms
memory: 3724kb

input:

1703
165
137 77
32 123
34 74
18 16
79 88
130 10
74 151
112 48
78 91
135 132
145 19
51 19
103 37
13 57
36 157
84 87
48 158
72 161
149 50
89 49
37 8
71 47
85 32
126 35
46 111
119 135
30 53
130 158
123 70
97 109
25 21
16 55
158 118
46 24
77 130
101 23
50 88
13 96
88 22
162 128
125 86
165 106
163 63
75 ...

output:

YES
243
142 41
30 1
119 141
61 98
145 19
19 74
74 151
151 155
155 110
110 65
41 122
160 103
103 133
133 118
118 158
158 48
48 74
74 35
35 156
156 62
116 55
55 16
16 18
18 73
73 78
78 25
25 103
103 133
133 118
118 158
158 48
48 74
74 151
151 155
155 29
122 41
41 142
142 33
33 88
88 50
50 25
25 103
10...

result:

ok OK!

Test #4:

score: 0
Accepted
time: 36ms
memory: 3620kb

input:

10
2000
1768 1996
1796 195
468 1622
1574 1483
489 1043
257 1318
1288 818
1654 1667
695 1592
974 17
274 1323
116 1169
1052 1404
1568 1163
960 1695
802 950
544 419
595 238
1901 585
888 1527
1861 402
1186 353
1479 1805
373 955
1513 1254
1084 1403
1425 1630
1371 1881
574 1254
1749 806
1784 615
1705 511
...

output:

NO
NO
NO
NO
NO
NO
NO
YES
2017
14 1441
883 887
617 925
1617 1736
1719 1410
1480 1309
801 15
172 1487
869 1386
1755 743
1720 1555
1638 1354
54 298
882 118
1677 20
222 74
1864 386
1673 702
136 1687
1824 23
1614 1958
1915 783
1441 14
14 677
677 1842
1842 569
569 1998
1998 602
602 147
147 516
516 1359
13...

result:

ok OK!

Test #5:

score: 0
Accepted
time: 939ms
memory: 11184kb

input:

10
1989
1562 1958
831 864
1079 73
509 988
920 770
498 1214
877 1208
211 1899
905 98
834 197
1054 1147
748 1041
923 816
1138 1592
129 1250
1091 1455
639 1720
1975 208
625 1692
884 1431
1128 1367
688 2
741 444
1462 1734
68 1133
1309 1666
1769 734
844 1372
275 134
1941 399
1110 1010
715 220
1133 1111
3...

output:

YES
990024
1621 1215
359 1158
700 957
918 1150
385 466
1740 1861
400 87
853 1860
1959 1756
935 1256
1670 949
893 1765
714 67
1458 422
321 891
1245 694
894 662
962 731
249 507
1814 762
616 123
162 46
124 1892
1015 1211
19 686
1145 1593
1450 1322
1383 1105
1181 99
137 1901
1767 203
72 449
12 537
1110 ...

result:

ok OK!

Test #6:

score: 0
Accepted
time: 331ms
memory: 6784kb

input:

11
1981
1974 1563
23 1887
1820 1714
1134 840
1134 275
571 76
1536 1739
875 821
1857 1114
1110 860
787 1671
1676 1478
1335 480
1885 432
119 438
363 1743
447 96
667 651
1571 816
590 1452
557 1339
185 1119
1643 459
1638 1614
807 266
730 737
404 686
465 1796
202 214
1210 227
1402 1238
744 494
1435 1804
...

output:

YES
183090
491 967
1119 1667
1466 185
33 366
798 1002
1763 641
745 523
1035 1234
40 986
1074 1596
361 1598
911 270
1527 1217
583 734
1583 401
1129 1576
535 1603
128 1669
480 1335
637 25
1087 716
1098 400
556 1164
1201 49
367 282
708 1817
1483 1516
1469 1236
189 105
1430 1688
1640 215
382 1139
66 109...

result:

ok OK!