QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#880329#2009. 树上的数gg_gong 0 0ms0kbC++202.1kb2025-02-03 06:16:142025-02-03 06:16:15

Details

Tip: Click on the bar to expand more detailed information

Pretests


Final Tests

Test #1:

score: 0
Memory Limit Exceeded

input:

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

output:


result:


Test #2:

score: 0
Memory Limit Exceeded

input:

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

output:


result:


Test #3:

score: 0
Memory Limit Exceeded

input:

10
160
87 10 152 84 150 132 51 136 109 77 33 128 97 98 82 21 26 148 146 121 112 81 92 13 19 45 15 68 155 114 138 35 94 61 22 83 75 78 154 49 48 70 126 137 93 23 29 159 3 108 88 69 62 104 158 124 120 1 147 27 157 79 145 107 105 140 113 95 102 41 141 36 119 30 153 90 16 80 31 103 14 66 43 20 47 39 76 ...

output:


result:


Test #4:

score: 0
Memory Limit Exceeded

input:

10
160
62 23 10 93 138 70 66 33 111 98 28 125 53 104 114 57 43 84 82 149 157 88 87 21 115 75 58 47 144 153 135 110 65 113 15 39 156 59 11 78 148 152 52 41 63 159 130 61 68 2 74 34 90 145 122 151 120 60 20 102 44 126 71 35 133 79 27 55 146 81 31 64 134 73 94 160 12 85 42 124 154 127 30 101 45 7 24 48...

output:


result:


Test #5:

score: 0
Memory Limit Exceeded

input:

10
2000
280 867 1111 895 1600 1529 1353 331 631 858 1618 291 1396 1871 57 1514 1855 661 1062 580 1258 1561 982 1082 595 181 137 1728 505 1097 329 220 160 1872 1244 625 1840 550 264 275 748 1347 640 693 223 1914 1929 479 418 1332 766 256 1781 569 344 728 929 1556 1481 1311 1257 455 545 1415 1151 1096...

output:


result:


Test #6:

score: 0
Memory Limit Exceeded

input:

10
2000
1816 1366 1220 1118 452 1937 1395 1976 1944 82 567 296 1845 1993 1556 141 1959 1805 647 1710 1423 1553 63 1673 1285 1137 103 223 958 1215 606 1478 854 1272 48 404 1969 1399 351 34 1731 821 1460 1054 723 1335 1684 1353 1425 1077 1668 491 1448 1512 280 1470 1340 742 1027 1473 1794 982 608 462 ...

output:


result:


Test #7:

score: 0
Memory Limit Exceeded

input:

10
2000
1006 640 240 1875 89 903 661 1812 649 223 396 394 1434 519 1593 1246 1777 189 1639 1417 245 1687 1728 1145 593 465 928 845 1902 532 856 700 1224 1736 619 857 321 749 38 1011 239 1611 261 1715 1412 883 605 548 388 1990 1855 121 967 1091 847 207 286 1633 10 1473 1849 1148 835 1618 1393 965 107...

output:


result:


Test #8:

score: 0
Memory Limit Exceeded

input:

10
160
4 123 140 79 137 132 122 6 59 124 76 73 115 39 55 77 26 114 151 45 86 91 154 89 85 109 62 41 138 50 82 158 126 148 108 116 99 25 14 38 66 141 78 139 29 88 64 80 98 105 56 83 106 15 21 136 31 28 10 46 159 127 110 153 18 43 11 54 42 160 57 48 17 30 33 49 5 101 51 95 53 84 111 112 7 87 96 104 65...

output:


result:


Test #9:

score: 0
Memory Limit Exceeded

input:

10
160
114 104 79 52 122 37 81 151 117 13 128 83 106 146 69 82 94 76 123 102 139 51 44 22 23 54 86 135 6 43 88 32 67 28 27 153 33 26 42 98 7 113 156 17 73 105 1 20 103 38 152 18 57 59 119 108 10 29 15 2 41 78 127 53 46 134 64 160 90 125 47 39 111 115 16 141 40 65 112 121 149 126 155 138 148 75 74 4 ...

output:


result:


Test #10:

score: 0
Memory Limit Exceeded

input:

10
2000
1069 519 700 955 1013 104 1328 812 192 1577 1313 1881 1863 984 1183 1479 1236 1618 1300 621 1773 96 1351 1632 489 1270 1999 1875 326 1129 1348 1135 1436 954 1215 1352 601 447 1627 1717 207 299 199 1736 1958 986 445 409 1041 226 850 749 1928 1742 1250 1220 828 1376 1740 513 518 818 227 742 11...

output:


result:


Test #11:

score: 0
Memory Limit Exceeded

input:

10
2000
172 1977 199 1507 339 767 484 1156 1541 200 939 1526 979 572 1315 1028 1826 744 1630 387 1503 355 741 592 680 1972 15 209 1546 1821 1976 1177 1612 1393 1484 1093 883 1154 208 601 843 1208 25 269 1007 583 287 1052 1242 1617 1380 839 261 1422 1271 1616 300 1897 1254 135 1590 1215 379 1895 715 ...

output:


result:


Test #12:

score: 0
Memory Limit Exceeded

input:

10
2000
449 529 646 257 1368 1819 19 1238 680 1320 287 621 692 1036 1895 1003 626 497 432 1962 130 143 1044 628 1798 255 980 503 761 962 745 308 1578 958 330 247 670 1050 1300 1795 121 1516 406 1084 1850 263 1376 596 1499 1921 12 704 1429 950 1287 789 1152 475 1575 1027 1574 611 1939 570 527 391 143...

output:


result:


Test #13:

score: 0
Memory Limit Exceeded

input:

10
160
95 93 74 42 94 113 109 152 141 28 34 45 89 158 18 86 121 119 39 63 155 132 6 24 20 50 108 19 61 122 124 111 22 78 21 11 157 53 116 130 71 54 112 80 118 76 138 149 88 154 126 9 125 142 143 13 129 145 103 16 27 73 26 77 115 144 44 7 107 147 92 117 65 134 114 41 96 64 105 59 46 10 12 67 49 69 51...

output:


result:


Test #14:

score: 0
Memory Limit Exceeded

input:

10
160
72 114 57 37 84 89 23 71 95 1 59 43 85 83 159 74 147 121 143 119 151 93 120 145 42 111 36 123 146 135 70 60 20 127 35 53 7 139 22 54 16 17 28 126 2 49 157 10 41 31 24 9 55 65 94 39 81 160 90 122 80 125 82 118 30 32 103 131 136 96 150 154 3 67 113 27 107 134 132 14 11 140 78 69 73 4 77 45 110 ...

output:


result:


Test #15:

score: 0
Memory Limit Exceeded

input:

10
160
115 48 83 103 76 109 37 116 35 77 55 102 3 2 81 137 54 19 129 1 93 75 12 6 106 130 58 108 131 122 42 15 40 32 9 150 118 158 146 60 159 120 89 29 18 104 45 88 66 7 127 133 124 96 28 74 52 113 57 70 91 123 22 24 141 85 107 82 126 142 135 97 49 156 44 90 61 34 160 128 132 41 121 65 138 147 68 14...

output:


result:


Test #16:

score: 0
Memory Limit Exceeded

input:

10
160
145 113 85 36 71 90 133 11 128 98 48 23 149 34 38 134 30 88 41 119 124 103 156 137 47 84 53 6 76 146 123 16 73 10 141 37 12 69 35 57 42 93 8 51 78 49 3 159 116 63 21 65 157 112 60 138 126 106 115 29 31 121 62 72 139 91 125 5 18 97 131 39 111 40 26 43 80 66 27 155 83 79 1 64 147 87 74 117 55 1...

output:


result:


Test #17:

score: 0
Memory Limit Exceeded

input:

10
2000
543 1512 275 1560 115 422 829 1825 1661 989 1040 446 1587 772 340 1265 606 511 1008 913 366 1272 486 287 760 1549 852 259 1463 258 1783 687 822 1239 632 1439 837 1500 1573 1853 1176 895 625 826 334 836 428 1721 1318 923 656 220 1289 633 1805 1300 1868 1053 1774 490 507 67 1894 614 145 1967 1...

output:


result:


Test #18:

score: 0
Memory Limit Exceeded

input:

10
2000
643 798 1692 1036 71 1697 756 12 1275 591 509 516 1638 867 151 664 83 1558 828 764 281 1259 631 1081 780 1497 651 567 728 379 1057 300 297 1480 1190 234 1159 893 939 1713 1101 1662 982 561 1842 1448 748 931 918 1596 476 615 705 274 1914 517 172 1973 888 1658 396 8 44 1845 411 1332 446 1549 9...

output:


result:


Test #19:

score: 0
Memory Limit Exceeded

input:

10
2000
1182 760 1167 896 770 1625 234 193 718 487 1416 1714 40 1814 47 1646 1058 755 672 1156 1191 1514 1479 1306 252 1045 1216 666 681 1542 25 23 1844 149 1744 328 1494 1566 597 1150 1225 796 14 879 1478 423 1074 615 344 1923 1599 1103 1715 1005 1152 789 476 1826 720 283 1665 1830 650 1154 1078 19...

output:


result:


Test #20:

score: 0
Memory Limit Exceeded

input:

10
2000
901 437 1497 1505 644 62 1823 1545 175 513 1737 1677 621 101 1850 1844 746 1928 233 1417 1150 781 443 1129 1818 396 935 260 1463 371 677 1058 1159 346 834 1223 1580 1804 1444 1824 749 1613 237 143 1065 863 1602 1846 1175 1224 1766 1660 1597 424 1743 573 494 1012 1622 161 1370 329 1215 1732 1...

output:


result: