QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#176171#6414. Classical Maximization Problemucup-team151WA 82ms3900kbC++202.5kb2023-09-11 11:37:172023-09-11 11:37:19

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

3
2
0 0
0 1
1 0
1 1
2
0 0
0 1
0 2
0 3
2
0 0
1 1
2 2
3 3

output:

2
2 4
3 1
2
4 3
2 1
0
4 3
2 1

result:

ok ok (3 test cases)

Test #2:

score: 0
Accepted
time: 82ms
memory: 3732kb

input:

10000
2
-107276936 -310501829
419434212 585811870
-65754386 -491212232
381152038 897148193
3
-474045168 493506332
299114415 540203303
165808153 983551
-506936261 -694189769
766718170 -725540031
975267148 -593051087
1
-818952276 -762387923
584023914 -612401389
6
-77701228 -266484128
659434465 6322062...

output:

0
2 4
3 1
0
6 5
2 3
1 4
0
2 1
0
3 5
10 2
12 8
6 4
1 11
7 9
0
9 14
10 2
4 11
8 7
13 12
6 5
3 1
0
1 2
0
36 53
7 64
66 15
4 56
8 57
60 30
55 59
42 38
63 40
48 25
41 14
49 28
34 23
52 17
24 18
27 51
58 19
11 3
13 62
2 6
12 37
50 43
31 47
21 32
61 9
10 39
20 22
29 5
44 65
33 26
46 35
16 45
1 54
0
6 5
3 1...

result:

ok ok (10000 test cases)

Test #3:

score: 0
Accepted
time: 78ms
memory: 3900kb

input:

10000
1
999855386 999580905
999342928 999615227
21
999601032 999015398
999155628 999176944
999309856 999524434
999121011 999509537
999323572 999685730
999272272 999769606
999450559 999390758
999632027 999178534
999024993 999463838
999784856 999374197
999980525 999366771
999241260 999516879
999599548...

output:

0
1 2
0
11 22
31 24
34 37
39 21
15 10
25 20
18 32
29 38
14 28
36 8
17 1
13 42
23 16
7 35
5 3
6 33
12 40
2 41
4 27
19 9
26 30
0
21 25
20 1
15 17
29 10
19 13
14 23
7 12
8 4
26 18
6 11
24 2
5 27
30 28
16 3
22 9
0
9 18
14 12
16 6
7 8
13 1
22 5
23 26
27 3
10 20
4 24
11 28
2 17
19 15
21 25
0
14 23
26 7
16...

result:

ok ok (10000 test cases)

Test #4:

score: 0
Accepted
time: 76ms
memory: 3680kb

input:

10000
5
999984799 999981445
999958394 999984217
999994978 999981258
999955539 999938710
999936554 999963561
999907222 999907508
999938166 999941959
999910567 999986887
999901446 999961092
999994730 999963038
5
999916115 999962400
999948250 999940355
999954204 999920844
999928148 999990369
999978118 ...

output:

0
3 10
1 2
4 7
5 8
6 9
0
7 6
5 9
3 2
4 8
1 10
0
15 20
6 14
19 21
9 1
13 7
22 12
8 18
11 16
3 17
4 10
5 2
0
1 8
7 6
4 2
3 5
0
5 8
13 17
1 28
25 16
19 2
15 7
18 29
30 6
10 32
31 12
3 24
9 22
11 23
4 21
14 27
20 26
0
5 10
1 9
4 3
6 2
8 7
0
4 16
7 6
10 8
5 12
13 9
15 3
1 14
11 2
0
18 30
37 63
33 3
28 14...

result:

ok ok (10000 test cases)

Test #5:

score: 0
Accepted
time: 77ms
memory: 3896kb

input:

10000
1
999990146 999993828
999995909 999996353
56
999999851 999991179
999997250 999997987
999990590 999997316
999997350 999996856
999997034 999996236
999999396 999996897
999991180 999993309
999991265 999995185
999993952 999994054
999990210 999994471
999993201 999995893
999997170 999998971
999998201...

output:

0
2 1
1
76 111
74 99
67 1
97 44
73 71
110 98
6 46
19 16
89 39
32 45
13 26
101 47
95 20
62 104
106 4
2 12
75 80
5 65
37 105
38 35
72 94
36 86
96 112
69 49
64 91
57 17
84 58
77 18
68 107
23 27
56 59
70 28
15 79
9 30
51 88
42 43
11 31
78 83
24 100
50 55
82 66
34 81
103 63
102 93
29 53
60 40
92 90
14 8
...

result:

ok ok (10000 test cases)

Test #6:

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

input:

10000
5
999999432 999999813
999999271 999999233
999999043 999999606
999999523 999999406
999999564 999999274
999999641 999999102
999999903 999999858
999999058 999999098
999999974 999999119
999999643 999999620
5
999999370 999999738
999999181 999999907
999999163 999999783
999999393 999999086
999999661 ...

output:

0
9 7
10 6
5 4
1 2
8 3
0
8 7
5 4
1 9
2 3
6 10
0
6 5
2 4
3 1
0
7 2
10 5
1 4
8 6
3 9
1
10 9
16 6
1 21
7 23
29 33
28 22
18 24
30 31
19 12
11 3
4 15
5 17
8 27
2 13
14 25
20 26
32 34
1
12 13
3 6
16 10
11 15
5 7
1 14
9 2
4 8
0
1 4
3 2
0
4 2
3 1
1
44 10
22 40
46 43
3 4
17 19
31 42
27 2
37 24
45 18
35 15
26...

result:

ok ok (10000 test cases)

Test #7:

score: -100
Wrong Answer
time: 79ms
memory: 3696kb

input:

10000
14
-369804569 -904204119
526374829 -824374353
-127549933 -904204119
-68608787 929413707
-68608787 -363454459
526374829 929413707
693313139 -824374353
-127549933 -726843762
526374829 -904204119
526374829 -363454459
526374829 -409731440
693313139 -726843762
693313139 929413707
-68608787 -8243743...

output:

22
28 19
10 5
26 25
11 16
23 14
18 13
4 6
24 20
17 15
11 10
9 2
22 21
14 7
28 27
24 13
12 8
26 22
19 18
17 3
27 23
9 1
25 21
31
12 21
34 9
36 25
29 27
24 13
40 30
35 33
15 26
39 22
38 32
7 4
29 23
17 5
40 36
20 16
32 24
15 12
6 28
31 10
33 19
8 3
18 1
38 37
35 16
13 10
39 25
19 17
14 2
34 31
20 18
3...

result:

wrong answer Integer parameter [name=k] equals to 22, violates the range [0, 14] (test case 1)