QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#83049#4506. City Parkxiaowuc1AC ✓71ms13416kbC++172.1kb2023-03-01 05:35:142023-03-01 05:35:17

详细

Test #1:

score: 100
Accepted
time: 2ms
memory: 3364kb

input:

8
14 1 2 2
16 9 1 5
11 3 5 2
3 4 2 5
5 9 3 2
21 3 2 8
13 2 1 1
13 8 3 5

output:

20

result:

ok single line: '20'

Test #2:

score: 0
Accepted
time: 2ms
memory: 3456kb

input:

12
2 5 2 1
3 3 2 1
7 3 3 1
9 5 2 1
14 3 2 1
15 5 3 1
1 3 1 3
5 3 1 3
7 4 1 2
11 3 1 3
13 3 1 3
17 3 1 2

output:

5

result:

ok single line: '5'

Test #3:

score: 0
Accepted
time: 2ms
memory: 3428kb

input:

6
1 2 1 1
1 -1 4 2
3 2 3 1
-1 3 3 1
-1 1 1 2
4 3 1 1

output:

8

result:

ok single line: '8'

Test #4:

score: 0
Accepted
time: 2ms
memory: 3404kb

input:

9
-1 8 4 3
5 1 5 2
6 6 6 2
7 8 4 2
3 3 2 6
2 -3 4 3
-2 1 3 7
-2 -2 4 1
12 -1 2 6

output:

55

result:

ok single line: '55'

Test #5:

score: 0
Accepted
time: 2ms
memory: 3552kb

input:

399
-400 0 400 400
-399 400 398 398
-398 798 396 396
-397 1194 394 394
-396 1588 392 392
-395 1980 390 390
-394 2370 388 388
-393 2758 386 386
-392 3144 384 384
-391 3528 382 382
-390 3910 380 380
-389 4290 378 378
-388 4668 376 376
-387 5044 374 374
-386 5418 372 372
-385 5790 370 370
-384 6160 368...

output:

21333600

result:

ok single line: '21333600'

Test #6:

score: 0
Accepted
time: 1ms
memory: 3472kb

input:

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

output:

24

result:

ok single line: '24'

Test #7:

score: 0
Accepted
time: 26ms
memory: 6844kb

input:

10000
96800 -193600 400 400
52600 -105200 400 400
660400 330200 400 400
446600 -893200 400 400
806400 -1612800 400 400
221400 -442800 400 400
97200 48600 400 400
476600 -953200 400 400
339000 -678000 400 400
577000 -1154000 400 400
297200 -594400 400 400
123600 61800 400 400
340800 -681600 400 400
5...

output:

1600000000

result:

ok single line: '1600000000'

Test #8:

score: 0
Accepted
time: 2ms
memory: 3468kb

input:

36
-2 -98 6 1
-5 -107 12 1
4 96 1 7
-5 93 12 1
0 100 2 1
-1 97 4 1
2 98 1 3
-4 4 10 1
-1 -3 4 1
-2 -3 1 5
-1 -103 4 1
-2 102 6 1
-3 -105 8 1
4 -4 1 7
0 -100 2 1
-4 95 1 9
6 -6 1 11
6 94 1 11
-4 -96 10 1
-2 -103 1 5
-4 104 10 1
-4 -5 1 9
-3 -5 8 1
4 -104 1 7
-2 2 6 1
-6 93 1 13
-2 97 1 5
2 -102 1 3
0...

output:

90

result:

ok single line: '90'

Test #9:

score: 0
Accepted
time: 15ms
memory: 5900kb

input:

10000
-999329600 999999600 400 400
-999906400 999999600 400 400
-1000000000 -999291600 400 400
999392400 -1000000000 400 400
-999688000 999999600 400 400
999999600 999058000 400 400
999825200 -1000000000 400 400
999999600 999691600 400 400
999326000 -1000000000 400 400
999765200 -1000000000 400 400
...

output:

400000000

result:

ok single line: '400000000'

Test #10:

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

input:

16
0 1 3 2
5 2 1 3
7 10 2 2
9 0 1 2
7 0 2 1
4 7 2 3
9 5 1 2
2 0 3 1
6 8 3 2
2 10 3 3
2 4 3 2
2 3 2 1
10 5 1 1
10 0 2 2
10 9 1 1
5 5 1 1

output:

25

result:

ok single line: '25'

Test #11:

score: 0
Accepted
time: 2ms
memory: 3408kb

input:

26
0 2 4 2
8 3 1 3
10 14 2 3
13 0 1 3
10 0 2 1
6 10 3 4
13 8 1 3
4 0 3 2
10 12 4 2
3 15 3 4
10 1 3 4
4 6 4 2
3 4 2 1
14 8 3 2
15 7 2 1
15 1 3 2
15 14 1 2
8 7 2 1
2 9 4 1
1 4 1 2
0 11 4 1
0 14 2 1
4 2 4 2
15 10 2 4
13 4 3 3
12 11 3 1

output:

64

result:

ok single line: '64'

Test #12:

score: 0
Accepted
time: 2ms
memory: 3388kb

input:

20
1 1 3 5
7 2 1 7
4 3 2 6
14 3 1 1
15 3 3 5
20 5 4 3
14 6 1 1
16 8 7 2
2 9 7 3
11 10 3 2
22 11 1 11
5 12 8 2
21 14 1 12
16 18 2 6
20 18 1 11
8 20 7 4
12 24 6 3
3 26 6 2
21 27 3 1
21 28 3 1

output:

77

result:

ok single line: '77'

Test #13:

score: 0
Accepted
time: 2ms
memory: 3464kb

input:

250
0 6 3 2
27 11 1 3
34 47 2 2
42 1 1 2
34 0 2 1
21 35 2 3
43 26 1 2
13 2 3 1
32 38 3 2
12 50 3 3
33 3 2 3
13 22 3 2
12 14 2 1
24 45 3 1
46 25 2 1
50 25 1 1
48 3 2 2
14 46 2 2
42 6 1 3
44 32 3 3
50 45 1 1
17 26 2 3
21 42 1 2
27 23 1 1
7 29 3 1
27 25 3 3
28 45 2 3
8 10 3 1
4 14 1 2
1 36 3 1
9 16 3 2...

output:

70

result:

ok single line: '70'

Test #14:

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

input:

1000
0 16 2 2
16 9 2 3
40 17 3 1
15 17 2 1
36 3 3 3
8 44 3 1
23 13 3 2
8 0 1 2
31 24 2 1
16 28 3 2
23 42 1 2
26 37 1 3
37 18 2 3
19 38 2 2
44 49 1 2
2 2 1 1
24 37 1 3
39 7 1 2
20 25 2 3
14 12 1 3
34 15 2 1
50 45 1 1
26 6 3 2
6 21 3 1
19 34 3 3
27 36 1 1
17 50 2 2
27 46 1 2
30 6 1 1
46 38 1 1
13 5 2 ...

output:

2407

result:

ok single line: '2407'

Test #15:

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

input:

1000
0 54 2 2
77 96 1 3
29 69 2 2
97 57 2 3
15 70 2 3
49 78 3 2
16 93 3 3
100 19 1 1
45 46 1 1
64 41 1 2
3 55 2 2
52 69 2 3
71 41 2 3
78 91 1 2
52 66 1 2
65 52 1 1
64 98 1 3
77 75 3 1
8 82 3 2
98 8 2 1
82 36 3 2
24 54 1 2
46 57 1 1
1 27 1 3
8 51 1 2
30 92 1 1
72 66 2 1
45 48 2 1
58 74 3 1
100 59 3 1...

output:

130

result:

ok single line: '130'

Test #16:

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

input:

10000
0 538 2 2
77 960 1 2
29 693 2 1
97 572 1 2
15 698 1 2
49 773 2 1
16 929 2 2
100 190 1 1
45 464 1 1
64 410 1 1
3 550 2 1
52 686 2 2
71 411 1 2
78 907 1 2
52 656 1 2
65 523 1 1
64 977 1 2
77 749 2 1
8 818 2 1
98 84 2 1
82 365 2 1
24 543 1 1
46 572 1 1
1 273 1 2
8 511 1 1
30 918 1 1
72 655 1 1
45...

output:

55

result:

ok single line: '55'

Test #17:

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

input:

10000
13 256 1 1
917 17 1 1
17 33 1 1
601 9 1 1
964 1 1 1
1 180 1 1
9 180 1 1
15 435 1 1
689 15 1 1
17 20 1 1
3 332 1 1
846 1 1 1
515 3 1 1
7 31 1 1
13 172 1 1
581 1 1 1
694 15 1 1
654 3 1 1
515 17 1 1
7 188 1 1
17 90 1 1
11 431 1 1
11 347 1 1
1 29 1 1
911 3 1 1
15 155 1 1
505 17 1 1
19 202 1 1
11 4...

output:

500

result:

ok single line: '500'

Test #18:

score: 0
Accepted
time: 17ms
memory: 7520kb

input:

20000
25 256 1 1
27 34 1 1
876 39 1 1
541 17 1 1
884 3 1 1
37 179 1 1
15 180 1 1
29 435 1 1
594 29 1 1
612 39 1 1
3 332 1 1
642 3 1 1
1 5 1 1
820 39 1 1
15 172 1 1
648 1 1 1
598 29 1 1
752 5 1 1
740 31 1 1
3 188 1 1
15 90 1 1
21 431 1 1
13 347 1 1
769 39 1 1
721 7 1 1
15 155 1 1
715 31 1 1
23 202 1 ...

output:

500

result:

ok single line: '500'

Test #19:

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

input:

1000
0 6 1 1
27 11 1 1
34 47 1 1
42 1 1 1
34 0 1 1
21 35 1 1
43 26 1 1
13 2 1 1
32 38 1 1
12 50 1 1
33 3 1 1
13 22 1 1
12 14 1 1
24 45 1 1
46 25 1 1
50 25 1 1
48 3 1 1
14 46 1 1
47 2 1 1
42 6 1 1
44 32 1 1
50 45 1 1
17 26 1 1
21 42 1 1
27 23 1 1
7 29 1 1
27 25 1 1
28 45 1 1
8 10 1 1
4 14 1 1
1 36 1 ...

output:

175

result:

ok single line: '175'

Test #20:

score: 0
Accepted
time: 68ms
memory: 11608kb

input:

50000
0 538 1 1
77 960 1 1
29 693 1 1
97 572 1 1
15 698 1 1
49 773 1 1
16 929 1 1
100 190 1 1
45 464 1 1
64 410 1 1
3 550 1 1
52 686 1 1
71 411 1 1
78 907 1 1
52 656 1 1
65 523 1 1
64 977 1 1
77 749 1 1
8 818 1 1
98 84 1 1
82 365 1 1
24 543 1 1
46 572 1 1
1 273 1 1
8 511 1 1
30 918 1 1
72 655 1 1
45...

output:

48977

result:

ok single line: '48977'

Test #21:

score: 0
Accepted
time: 65ms
memory: 12628kb

input:

50000
0 2461 1 1
10 2335 1 1
72 3509 1 1
38 3316 1 1
46 317 1 1
100 2837 1 1
47 3086 1 1
40 1905 1 1
99 3944 1 1
5 2257 1 1
82 80 1 1
61 297 1 1
8 2258 1 1
11 3851 1 1
61 250 1 1
86 3237 1 1
66 2363 1 1
10 1999 1 1
84 2108 1 1
39 134 1 1
12 584 1 1
30 3270 1 1
79 1715 1 1
41 1238 1 1
84 2417 1 1
93 ...

output:

18

result:

ok single line: '18'

Test #22:

score: 0
Accepted
time: 62ms
memory: 13028kb

input:

50000
0 2689 2 2
77 4796 1 2
29 3465 2 1
97 2861 1 2
15 3491 1 2
49 3864 2 1
16 4644 2 2
100 953 1 1
45 2323 1 1
64 2052 1 1
3 2751 2 1
52 3430 2 2
71 2057 1 2
78 4535 1 2
52 3282 1 2
65 2615 1 1
64 4884 1 2
77 3746 2 1
8 4088 2 1
98 420 2 1
82 1827 2 1
24 2717 1 1
46 2861 1 1
1 1368 1 2
8 2553 1 1
...

output:

58

result:

ok single line: '58'

Test #23:

score: 0
Accepted
time: 2ms
memory: 3452kb

input:

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

output:

28

result:

ok single line: '28'

Test #24:

score: 0
Accepted
time: 71ms
memory: 13416kb

input:

50000
0 1315 4 2
53 2189 1 3
68 9347 2 3
83 345 1 3
67 76 2 1
42 6868 3 4
85 5269 1 3
42 7012 4 4
26 474 3 2
63 7564 4 2
24 9826 3 4
65 726 3 4
27 4364 4 2
24 2749 2 1
49 8977 4 1
91 5045 3 2
99 4940 2 1
95 737 3 2
27 9139 3 2
95 500 4 4
83 1253 1 3
87 6296 3 3
100 8886 1 2
35 5133 3 4
41 8415 2 2
5...

output:

289

result:

ok single line: '289'

Test #25:

score: 0
Accepted
time: 2ms
memory: 3400kb

input:

9
2 3 1 1
3 3 1 1
4 3 1 1
2 4 1 1
3 4 1 1
4 4 1 1
2 5 1 1
3 5 1 1
4 5 1 1

output:

9

result:

ok single line: '9'

Test #26:

score: 0
Accepted
time: 2ms
memory: 3336kb

input:

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

output:

24

result:

ok single line: '24'

Test #27:

score: 0
Accepted
time: 2ms
memory: 3376kb

input:

50
3 3 1 1
4 3 1 1
5 3 1 1
6 3 1 1
3 4 1 1
4 4 1 1
5 4 1 1
6 4 1 1
3 5 1 1
4 5 1 1
5 5 1 1
6 5 1 1
3 6 1 1
4 6 1 1
5 6 1 1
6 6 1 1
3 7 1 1
4 7 1 1
5 7 1 1
6 7 1 1
7 7 1 1
8 7 1 1
9 7 1 1
3 8 1 1
4 8 1 1
5 8 1 1
6 8 1 1
7 8 1 1
8 8 1 1
9 8 1 1
3 9 1 1
4 9 1 1
5 9 1 1
6 9 1 1
7 12 1 1
8 12 1 1
9 12 1 ...

output:

34

result:

ok single line: '34'

Test #28:

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

input:

50
10 12 1 1
3 8 1 1
7 8 1 1
4 6 1 1
5 4 1 1
8 12 1 1
4 4 1 1
8 15 1 1
4 8 1 1
3 9 1 1
8 14 1 1
3 6 1 1
5 6 1 1
5 9 1 1
7 13 1 1
6 6 1 1
9 8 1 1
6 7 1 1
4 9 1 1
9 13 1 1
3 3 1 1
6 4 1 1
10 14 1 1
7 7 1 1
6 8 1 1
10 13 1 1
3 4 1 1
5 5 1 1
9 15 1 1
9 7 1 1
3 5 1 1
5 7 1 1
3 7 1 1
6 5 1 1
9 14 1 1
7 15...

output:

34

result:

ok single line: '34'

Test #29:

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

input:

7
11 16 2 2
8 15 2 2
9 21 2 2
5 14 2 2
7 18 2 2
9 12 2 2
12 19 2 2

output:

4

result:

ok single line: '4'

Test #30:

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

input:

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

output:

12

result:

ok single line: '12'