QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#172477#3506. Team Contestznstz#37 176ms41248kbC++202.8kb2023-09-09 19:27:242024-07-04 01:53:47

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 8
Accepted

Test #1:

score: 8
Accepted
time: 0ms
memory: 3624kb

input:

3
1 1 2
1 2 1
2 1 1

output:

6

result:

ok single line: '6'

Test #2:

score: 0
Accepted
time: 4ms
memory: 3744kb

input:

3
1 2 2
2 1 2
2 2 1

output:

-1

result:

ok single line: '-1'

Test #3:

score: 0
Accepted
time: 4ms
memory: 3696kb

input:

3
3 3 3
2 2 2
1 1 1

output:

-1

result:

ok single line: '-1'

Test #4:

score: 0
Accepted
time: 4ms
memory: 3688kb

input:

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

output:

8

result:

ok single line: '8'

Test #5:

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

input:

3
1 2 3
1 3 4
1 4 2

output:

-1

result:

ok single line: '-1'

Test #6:

score: 0
Accepted
time: 4ms
memory: 3756kb

input:

3
4 1 3
3 1 2
2 1 4

output:

-1

result:

ok single line: '-1'

Test #7:

score: 0
Accepted
time: 4ms
memory: 3760kb

input:

3
2 4 1
4 3 1
3 2 1

output:

-1

result:

ok single line: '-1'

Test #8:

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

input:

3
9 9 1
9 9 2
9 9 3

output:

-1

result:

ok single line: '-1'

Test #9:

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

input:

3
9 2 9
9 3 9
9 1 9

output:

-1

result:

ok single line: '-1'

Test #10:

score: 0
Accepted
time: 4ms
memory: 3692kb

input:

3
3 9 9
1 9 9
2 9 9

output:

-1

result:

ok single line: '-1'

Test #11:

score: 0
Accepted
time: 4ms
memory: 3844kb

input:

300
57761889 84542255 27050597
34660889 31001456 73541706
28145521 16239284 59747407
28301910 73147643 52729219
76934759 81682223 25122810
79313872 51831684 8459494
79291107 42746492 28469171
178085 36381730 88571483
88031596 68636497 47738858
78328954 72492907 81005026
20116327 27194915 29047676
15...

output:

298779499

result:

ok single line: '298779499'

Test #12:

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

input:

236
11541369 9792582 4713403
87402689 82538784 88522804
35622147 10769145 14518449
85768984 12580765 86992032
97843742 97233030 66564513
87402689 41237008 87442884
73770719 95022375 94286048
89771996 85187794 89890546
61271783 67426819 70494968
638822 67263206 68519784
53640982 58599424 55894005
414...

output:

116772345

result:

ok single line: '116772345'

Test #13:

score: 0
Accepted
time: 4ms
memory: 5880kb

input:

269
58136345 49561853 5443232
82513448 84993754 23134893
22936917 4757404 58572392
55675309 81607644 84281385
77118458 79792604 84221560
95665801 97753268 96965456
75900766 78524832 80967453
88062625 87328036 70262153
69366513 49346229 29658819
22352552 10391396 40033635
22375771 60866395 3431631
61...

output:

219417965

result:

ok single line: '219417965'

Test #14:

score: 0
Accepted
time: 5ms
memory: 5912kb

input:

300
8161981 27071802 32031373
8819234 23356530 24538586
10553392 11086093 9901019
2335958 33351071 36363483
4517467 7763984 8075958
5311696 5749790 6698515
90417492 2769387 90241112
61926281 51651765 54285034
996697 517518 2853812
61926281 51651765 44079327
78933588 9905743 78435105
5171396 24886452...

output:

-1

result:

ok single line: '-1'

Test #15:

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

input:

280
133 127 23
85 28 108
67 68 115
121 90 100
89 17 102
82 115 58
116 136 77
160 178 93
137 25 116
44 110 68
20 54 48
119 102 117
131 69 8
56 71 133
84 1 66
123 63 26
14 12 116
108 46 80
18 27 59
40 18 85
86 103 86
9 294 295
45 48 21
75 98 43
84 110 67
258 251 92
97 122 81
22 8 36
12 133 129
21 47 1...

output:

424

result:

ok single line: '424'

Test #16:

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

input:

300
29 36 16
22 13 41
10 60 40
27 25 47
41 58 12
91 108 114
40 11 26
28 39 51
62 79 69
34 44 1
6 23 32
43 2 22
43 28 28
15 47 29
16 44 39
41 2 13
3 11 3
26 25 2
33 23 8
4 2 13
29 50 49
35 114 123
10 59 47
29 40 40
36 62 4
19 50 2
9 4 43
25 31 35
22 39 30
13 15 47
9 33 40
107 107 60
43 54 51
43 12 26...

output:

159

result:

ok single line: '159'

Test #17:

score: 0
Accepted
time: 5ms
memory: 5824kb

input:

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

output:

-1

result:

ok single line: '-1'

Test #18:

score: 0
Accepted
time: 4ms
memory: 5892kb

input:

294
97782065 49441237 40553674
9802414 49441237 40811934
97782065 49441237 5522754
97782065 2894174 40811934
16244848 49441237 40811934
97782065 9535463 40811934
97782065 42126153 40811934
97782065 49441237 40811934
97782065 49441237 26799076
97782065 49441237 35044643
97782065 49441237 3672688
7878...

output:

-1

result:

ok single line: '-1'

Test #19:

score: 0
Accepted
time: 5ms
memory: 5848kb

input:

285
35578202 31000569 36164852
81961944 76527075 82527820
88051400 86477050 89247199
94640648 92434215 94445703
94995965 93531084 95877794
89327002 87766145 90029250
92910262 91636154 93379830
2426096 3925994 6056288
35633423 31247563 36205265
15437571 12960237 21719331
76640285 69178877 77008765
39...

output:

-1

result:

ok single line: '-1'

Test #20:

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

input:

300
97002072 78259156 57267451
97002072 78259156 57267451
97002072 78259156 57267451
97002072 78259156 57267451
97002072 78259156 57267451
97002072 78259156 57267451
97002072 78259156 57267451
97002072 78259156 57267451
97002072 78259156 57267451
97002072 78259156 57267451
97002072 78259156 57267451...

output:

-1

result:

ok single line: '-1'

Test #21:

score: 0
Accepted
time: 4ms
memory: 5876kb

input:

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

output:

300

result:

ok single line: '300'

Test #22:

score: 0
Accepted
time: 4ms
memory: 5928kb

input:

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

output:

6

result:

ok single line: '6'

Subtask #2:

score: 29
Accepted

Dependency #1:

100%
Accepted

Test #23:

score: 29
Accepted
time: 16ms
memory: 8520kb

input:

4000
69754624 40719054 25880627
45203696 74886668 48113236
40895239 84354151 84890376
580122 37101650 40004403
59771964 89650621 34494619
79179033 28652564 80985199
779920 79517242 92970610
20761904 89259959 69731542
65839528 15069115 60213981
5488382 94474806 56098782
90286260 33217627 87863760
862...

output:

299859551

result:

ok single line: '299859551'

Test #24:

score: 0
Accepted
time: 12ms
memory: 8228kb

input:

3976
73080835 73640233 17173988
38377905 54150225 29777426
22029226 17439133 72850346
61386107 40478181 4651975
16895999 51353691 43033018
57768480 23567989 60837577
61998151 26423316 14211198
51429621 26067062 75369957
29953695 1177407 26929816
27206543 15665697 52877584
20574799 48632736 58521973
...

output:

260736782

result:

ok single line: '260736782'

Test #25:

score: 0
Accepted
time: 18ms
memory: 8160kb

input:

3999
99927690 82478783 99894018
52462308 24076588 3853388
49684627 86270167 86956767
80151792 80384937 29911028
86472898 90557517 90991905
64083294 6483865 46599362
49160914 45527295 9784891
72907827 73209811 33536143
24783914 18011564 7818799
5695363 21346535 27147968
43452998 45734019 52114612
916...

output:

214455382

result:

ok single line: '214455382'

Test #26:

score: 0
Accepted
time: 16ms
memory: 8080kb

input:

3983
46849863 43395352 44177592
45657330 42981464 43171279
20939599 73900639 73101781
65057736 62457563 35356299
90533889 9436603 90283376
88644998 68106794 87666543
64635325 61721461 22520753
34122184 4775910 32524643
15121582 15343649 3341666
1623242 1912753 1243989
371131 459445 121013
62142487 5...

output:

-1

result:

ok single line: '-1'

Test #27:

score: 0
Accepted
time: 14ms
memory: 7312kb

input:

2669
1203 722 409
1256 1277 44
1914 1956 896
189 1258 1224
2033 2056 2069
2128 1129 2153
1270 1431 1390
1938 1977 1717
1426 1100 1439
971 1799 1811
1076 437 1
1785 424 1847
1442 1486 898
693 1166 523
614 1942 1961
967 1251 1218
1303 485 1307
935 1634 1631
1263 1287 1227
646 379 2
1809 1863 886
90 15...

output:

3670

result:

ok single line: '3670'

Test #28:

score: 0
Accepted
time: 18ms
memory: 8476kb

input:

3999
218 755 664
1366 474 1371
92 171 572
402 109 682
801 13 831
307 390 666
745 504 462
1408 920 1397
364 325 780
233 465 599
374 52 436
374 139 165
496 624 91
240 504 151
35 618 229
739 523 358
311 449 388
71 688 806
485 433 93
653 189 39
180 163 703
377 117 755
75 69 208
675 174 495
108 932 972
1...

output:

2433

result:

ok single line: '2433'

Test #29:

score: 0
Accepted
time: 14ms
memory: 9640kb

input:

4000
234 42 243
88 272 269
249 247 133
122 229 237
219 211 113
215 99 209
201 114 202
202 178 202
34 265 265
270 275 163
288 105 279
249 247 19
276 277 12
253 69 259
243 242 95
112 201 203
262 267 134
239 236 154
155 275 270
215 25 210
266 93 266
254 65 261
289 294 287
249 118 257
288 48 278
275 275...

output:

-1

result:

ok single line: '-1'

Test #30:

score: 0
Accepted
time: 14ms
memory: 9308kb

input:

3827
58082543 57688628 42141064
58082543 37790572 56085417
30971155 57688628 56085417
58082543 7542303 56085417
58082543 6153647 56085417
58082543 57688628 56085417
58082543 57688628 56085417
58082543 15627876 56085417
19305094 57688628 56085417
58082543 57688628 56085417
51215057 57688628 56085417
...

output:

-1

result:

ok single line: '-1'

Test #31:

score: 0
Accepted
time: 22ms
memory: 8276kb

input:

3994
22717165 23485128 24150090
58326041 59735236 60460260
99683380 99624257 99659578
32760370 34440574 34542189
15816729 16596399 16849315
10007699 10765273 11243538
36933127 38871347 38984815
84796877 86029328 86457916
90312082 90579793 91410302
24270836 24773451 25474600
81299206 82908771 8295564...

output:

-1

result:

ok single line: '-1'

Test #32:

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

input:

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

output:

900

result:

ok single line: '900'

Test #33:

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

input:

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

output:

6

result:

ok single line: '6'

Test #34:

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

input:

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

output:

4002

result:

ok single line: '4002'

Test #35:

score: 0
Accepted
time: 10ms
memory: 9628kb

input:

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

output:

6

result:

ok single line: '6'

Subtask #3:

score: 0
Wrong Answer

Test #36:

score: 0
Wrong Answer
time: 176ms
memory: 41248kb

input:

150000
3 3 1
2 5 5
1 3 5
4 3 5
3 4 4
4 4 2
4 3 5
5 1 2
5 4 1
2 3 3
4 4 5
3 3 5
2 4 3
1 3 2
5 2 4
4 5 3
2 5 1
5 4 3
3 2 5
1 1 4
3 2 5
2 3 5
3 3 4
1 3 4
2 4 3
1 5 4
2 1 4
1 4 4
5 4 3
4 5 3
2 1 2
5 4 5
4 5 4
5 1 2
1 4 1
3 1 4
2 5 2
3 5 3
3 4 2
5 1 4
5 2 1
1 2 2
1 3 2
5 4 3
5 4 5
3 2 4
5 5 2
5 3 3
3 4 4...

output:


result:

wrong output format Output file not found: ""

Subtask #4:

score: 0
Skipped

Dependency #3:

0%

Subtask #5:

score: 0
Skipped

Dependency #4:

0%

Subtask #6:

score: 0
Skipped

Dependency #5:

0%

Subtask #7:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

0%