QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#602895#8348. 赌徒3un_larryfunc100 ✓181ms30532kbC++201.5kb2024-10-01 13:24:142024-10-01 13:24:15

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 3
Accepted

Test #1:

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

input:

100
651038477 189263729 953550806
440398864 762467402 45848303
467602579 42839722 258136833
955656013 340436834 985138623
962742165 525866620 117803361
319733126 58825090 445655965
50230277 959415469 801214421
925191559 678215060 485878995
102080431 748846405 626417068
127754511 680829125 530743446
...

output:

-3984667488

result:

ok single line: '-3984667488'

Test #2:

score: 3
Accepted
time: 2ms
memory: 11748kb

input:

100
1 1 100
2 2 99
3 3 98
4 4 97
5 5 96
6 6 95
7 7 94
8 8 93
9 9 92
10 10 91
11 11 90
12 12 89
13 13 88
14 14 87
15 15 86
16 16 85
17 17 84
18 18 83
19 19 82
20 20 81
21 21 80
22 22 79
23 23 78
24 24 77
25 25 76
26 26 75
27 27 74
28 28 73
29 29 72
30 30 71
31 31 70
32 32 69
33 33 68
34 34 67
35 35 6...

output:

0

result:

ok single line: '0'

Test #3:

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

input:

100
500 500 1000000000
500 500 1000000000
500 500 1000000000
500 500 1000000000
500 500 1000000000
500 500 1000000000
500 500 1000000000
500 500 1000000000
500 500 1000000000
500 500 1000000000
500 500 1000000000
500 500 1000000000
500 500 1000000000
500 500 1000000000
500 500 1000000000
500 500 100...

output:

399999000000

result:

ok single line: '399999000000'

Test #4:

score: 3
Accepted
time: 2ms
memory: 11896kb

input:

100
1000000 1000000 1000000000
1000000 1000000 1000000000
1000000 1000000 1000000000
1000000 1000000 1000000000
1000000 1000000 1000000000
1000000 1000000 1000000000
1000000 1000000 1000000000
1000000 1000000 1000000000
1000000 1000000 1000000000
1000000 1000000 1000000000
1000000 1000000 1000000000...

output:

-4000000

result:

ok single line: '-4000000'

Test #5:

score: 3
Accepted
time: 2ms
memory: 11824kb

input:

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

output:

319999997084

result:

ok single line: '319999997084'

Subtask #2:

score: 21
Accepted

Dependency #1:

100%
Accepted

Test #6:

score: 21
Accepted
time: 0ms
memory: 9808kb

input:

1000
556753360 794327018 150116472
212403895 885211063 908402611
776190453 982300031 837010658
43115997 709411772 123047318
114175953 16115870 225778499
505972853 382021643 67378895
689971007 741742710 41589399
597258351 143289901 299212635
68182659 93630752 594259146
196764360 331501409 110463656
7...

output:

-3997854012

result:

ok single line: '-3997854012'

Test #7:

score: 21
Accepted
time: 2ms
memory: 11780kb

input:

1000
1 1 1000
2 2 999
3 3 998
4 4 997
5 5 996
6 6 995
7 7 994
8 8 993
9 9 992
10 10 991
11 11 990
12 12 989
13 13 988
14 14 987
15 15 986
16 16 985
17 17 984
18 18 983
19 19 982
20 20 981
21 21 980
22 22 979
23 23 978
24 24 977
25 25 976
26 26 975
27 27 974
28 28 973
29 29 972
30 30 971
31 31 970
32...

output:

0

result:

ok single line: '0'

Test #8:

score: 21
Accepted
time: 0ms
memory: 11772kb

input:

1000
500 500 1000000000
500 500 1000000000
500 500 1000000000
500 500 1000000000
500 500 1000000000
500 500 1000000000
500 500 1000000000
500 500 1000000000
500 500 1000000000
500 500 1000000000
500 500 1000000000
500 500 1000000000
500 500 1000000000
500 500 1000000000
500 500 1000000000
500 500 10...

output:

3999999000000

result:

ok single line: '3999999000000'

Test #9:

score: 21
Accepted
time: 2ms
memory: 11804kb

input:

1000
1000000 1000000 1000000000
1000000 1000000 1000000000
1000000 1000000 1000000000
1000000 1000000 1000000000
1000000 1000000 1000000000
1000000 1000000 1000000000
1000000 1000000 1000000000
1000000 1000000 1000000000
1000000 1000000 1000000000
1000000 1000000 1000000000
1000000 1000000 100000000...

output:

0

result:

ok single line: '0'

Test #10:

score: 21
Accepted
time: 2ms
memory: 11800kb

input:

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

output:

3759999982044

result:

ok single line: '3759999982044'

Subtask #3:

score: 34
Accepted

Test #11:

score: 34
Accepted
time: 181ms
memory: 28648kb

input:

500000
243340130 869967634 721560056
79570239 750056031 966348473
404026098 300201750 803030673
729195387 563457224 59818849
904561712 355648412 30197525
692632473 218602585 352775399
118124695 444872952 793854346
692934439 459706288 708143356
939055658 994920111 719104230
570228202 885607167 142801...

output:

-3999993060

result:

ok single line: '-3999993060'

Subtask #4:

score: 42
Accepted

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

100%
Accepted

Test #12:

score: 42
Accepted
time: 180ms
memory: 28404kb

input:

500000
243340130 869967634 721560056
79570239 750056031 966348473
404026098 300201750 803030673
729195387 563457224 59818849
904561712 355648412 30197525
692632473 218602585 352775399
118124695 444872952 793854346
692934439 459706288 708143356
939055658 994920111 719104230
570228202 885607167 142801...

output:

-3999993060

result:

ok single line: '-3999993060'

Test #13:

score: 42
Accepted
time: 93ms
memory: 30532kb

input:

500000
1 1 500000
2 2 499999
3 3 499998
4 4 499997
5 5 499996
6 6 499995
7 7 499994
8 8 499993
9 9 499992
10 10 499991
11 11 499990
12 12 499989
13 13 499988
14 14 499987
15 15 499986
16 16 499985
17 17 499984
18 18 499983
19 19 499982
20 20 499981
21 21 499980
22 22 499979
23 23 499978
24 24 499977...

output:

0

result:

ok single line: '0'

Test #14:

score: 42
Accepted
time: 87ms
memory: 28972kb

input:

500000
2000 2000 1000000000
2000 2000 1000000000
2000 2000 1000000000
2000 2000 1000000000
2000 2000 1000000000
2000 2000 1000000000
2000 2000 1000000000
2000 2000 1000000000
2000 2000 1000000000
2000 2000 1000000000
2000 2000 1000000000
2000 2000 1000000000
2000 2000 1000000000
2000 2000 1000000000...

output:

1999999984000000

result:

ok single line: '1999999984000000'

Test #15:

score: 42
Accepted
time: 93ms
memory: 28116kb

input:

500000
1000000 1000000 1000000000
1000000 1000000 1000000000
1000000 1000000 1000000000
1000000 1000000 1000000000
1000000 1000000 1000000000
1000000 1000000 1000000000
1000000 1000000 1000000000
1000000 1000000 1000000000
1000000 1000000 1000000000
1000000 1000000 1000000000
1000000 1000000 1000000...

output:

1996000000000000

result:

ok single line: '1996000000000000'

Test #16:

score: 42
Accepted
time: 79ms
memory: 28436kb

input:

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

output:

1999199999828604

result:

ok single line: '1999199999828604'