QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#298466#7526. Credit Cardsucup-team1005#AC ✓40ms19348kbC++201.4kb2024-01-06 10:43:402024-01-06 10:43:40

詳細信息

Test #1:

score: 100
Accepted
time: 1ms
memory: 3580kb

input:

3

output:

0

result:

ok OK 0 triangles!

Test #2:

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

input:

4

output:

1
2 3 4

result:

ok OK 1 triangles!

Test #3:

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

input:

9

output:

2
2 5 6
3 7 8

result:

ok OK 2 triangles!

Test #4:

score: 0
Accepted
time: 29ms
memory: 19348kb

input:

1000000

output:

333333
2 7 8
3 9 10
4 11 12
5 13 15
6 14 16
250001 500001 750001
250002 500002 750002
250003 500003 750003
250004 500004 750004
250005 500005 750005
250006 500006 750006
250007 500007 750007
250008 500008 750008
250009 500009 750009
250010 500010 750010
250011 500011 750011
250012 500012 750012
2500...

result:

ok OK 333333 triangles!

Test #5:

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

input:

1

output:

0

result:

ok OK 0 triangles!

Test #6:

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

input:

2

output:

0

result:

ok OK 0 triangles!

Test #7:

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

input:

5

output:

1
2 3 4

result:

ok OK 1 triangles!

Test #8:

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

input:

6

output:

1
2 4 5

result:

ok OK 1 triangles!

Test #9:

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

input:

7

output:

2
2 4 5
3 6 7

result:

ok OK 2 triangles!

Test #10:

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

input:

8

output:

2
2 4 5
3 6 7

result:

ok OK 2 triangles!

Test #11:

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

input:

10

output:

3
2 5 6
3 7 8
4 9 10

result:

ok OK 3 triangles!

Test #12:

score: 0
Accepted
time: 29ms
memory: 10472kb

input:

621316

output:

207105
2 15 16
3 17 18
4 19 20
5 21 22
6 23 24
7 25 26
8 27 29
9 28 30
10 31 33
11 32 34
12 35 38
13 36 39
14 37 40
155330 310659 465988
155331 310660 465989
155332 310661 465990
155333 310662 465991
155334 310663 465992
155335 310664 465993
155336 310665 465994
155337 310666 465995
155338 310667 46...

result:

ok OK 207105 triangles!

Test #13:

score: 0
Accepted
time: 36ms
memory: 14596kb

input:

713171

output:

237723
2 5 6
3 7 8
4 9 10
178296 356588 534880
178297 356589 534881
178298 356590 534882
178299 356591 534883
178300 356592 534884
178301 356593 534885
178302 356594 534886
178303 356595 534887
178304 356596 534888
178305 356597 534889
178306 356598 534890
178307 356599 534891
178308 356600 534892
1...

result:

ok OK 237723 triangles!

Test #14:

score: 0
Accepted
time: 27ms
memory: 18376kb

input:

825609

output:

275202
2 7 8
3 9 10
4 11 12
5 13 14
206404 412806 619208
206405 412807 619209
206406 412808 619210
206407 412809 619211
206408 412810 619212
206409 412811 619213
206410 412812 619214
206411 412813 619215
206412 412814 619216
206413 412815 619217
206414 412816 619218
206415 412817 619219
206416 41281...

result:

ok OK 275202 triangles!

Test #15:

score: 0
Accepted
time: 34ms
memory: 12028kb

input:

782282

output:

260760
2 6 7
3 8 9
4 10 11
5 12 14
195573 391143 586713
195574 391144 586714
195575 391145 586715
195576 391146 586716
195577 391147 586717
195578 391148 586718
195579 391149 586719
195580 391150 586720
195581 391151 586721
195582 391152 586722
195583 391153 586723
195584 391154 586724
195585 391155...

result:

ok OK 260760 triangles!

Test #16:

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

input:

148128

output:

49375
2 15 16
3 17 18
4 19 20
5 21 22
6 23 24
7 25 26
8 27 29
9 28 30
10 31 33
11 32 34
12 35 38
13 36 39
37033 74065 111097
37034 74066 111098
37035 74067 111099
37036 74068 111100
37037 74069 111101
37038 74070 111102
37039 74071 111103
37040 74072 111104
37041 74073 111105
37042 74074 111106
3704...

result:

ok OK 49375 triangles!

Test #17:

score: 0
Accepted
time: 32ms
memory: 13488kb

input:

681282

output:

227093
2 6 7
3 8 9
4 10 11
170323 340643 510963
170324 340644 510964
170325 340645 510965
170326 340646 510966
170327 340647 510967
170328 340648 510968
170329 340649 510969
170330 340650 510970
170331 340651 510971
170332 340652 510972
170333 340653 510973
170334 340654 510974
170335 340655 510975
...

result:

ok OK 227093 triangles!

Test #18:

score: 0
Accepted
time: 40ms
memory: 15832kb

input:

798547

output:

266182
2 6 7
3 8 9
4 10 12
5 11 13
199640 399276 598912
199641 399277 598913
199642 399278 598914
199643 399279 598915
199644 399280 598916
199645 399281 598917
199646 399282 598918
199647 399283 598919
199648 399284 598920
199649 399285 598921
199650 399286 598922
199651 399287 598923
199652 399288...

result:

ok OK 266182 triangles!

Test #19:

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

input:

349290

output:

116429
2 10 11
3 12 13
4 14 15
5 16 17
6 18 19
7 20 22
8 21 23
87325 174647 261969
87326 174648 261970
87327 174649 261971
87328 174650 261972
87329 174651 261973
87330 174652 261974
87331 174653 261975
87332 174654 261976
87333 174655 261977
87334 174656 261978
87335 174657 261979
87336 174658 2619...

result:

ok OK 116429 triangles!

Test #20:

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

input:

317275

output:

105758
2 9 10
3 11 12
4 13 14
5 15 16
6 17 19
7 18 21
8 20 22
79322 158640 237958
79323 158641 237959
79324 158642 237960
79325 158643 237961
79326 158644 237962
79327 158645 237963
79328 158646 237964
79329 158647 237965
79330 158648 237966
79331 158649 237967
79332 158650 237968
79333 158651 23796...

result:

ok OK 105758 triangles!

Test #21:

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

input:

100000

output:

33333
2 10 11
3 12 13
4 14 15
5 16 17
6 18 19
7 20 22
8 21 24
9 23 25
25001 50001 75001
25002 50002 75002
25003 50003 75003
25004 50004 75004
25005 50005 75005
25006 50006 75006
25007 50007 75007
25008 50008 75008
25009 50009 75009
25010 50010 75010
25011 50011 75011
25012 50012 75012
25013 50013 75...

result:

ok OK 33333 triangles!

Test #22:

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

input:

83568

output:

27855
2 9 10
3 11 12
4 13 14
5 15 16
6 17 19
7 18 20
20893 41785 62677
20894 41786 62678
20895 41787 62679
20896 41788 62680
20897 41789 62681
20898 41790 62682
20899 41791 62683
20900 41792 62684
20901 41793 62685
20902 41794 62686
20903 41795 62687
20904 41796 62688
20905 41797 62689
20906 41798 6...

result:

ok OK 27855 triangles!

Test #23:

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

input:

41476

output:

13825
2 6 7
3 8 9
4 10 12
5 11 13
10370 20739 31108
10371 20740 31109
10372 20741 31110
10373 20742 31111
10374 20743 31112
10375 20744 31113
10376 20745 31114
10377 20746 31115
10378 20747 31116
10379 20748 31117
10380 20749 31118
10381 20750 31119
10382 20751 31120
10383 20752 31121
10384 20753 31...

result:

ok OK 13825 triangles!

Test #24:

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

input:

61028

output:

20342
2 7 8
3 9 10
4 11 12
5 13 14
6 15 17
15258 30515 45772
15259 30516 45773
15260 30517 45774
15261 30518 45775
15262 30519 45776
15263 30520 45777
15264 30521 45778
15265 30522 45779
15266 30523 45780
15267 30524 45781
15268 30525 45782
15269 30526 45783
15270 30527 45784
15271 30528 45785
15272...

result:

ok OK 20342 triangles!

Test #25:

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

input:

34231

output:

11410
2 13 14
3 15 16
4 17 18
5 19 20
6 21 22
7 23 25
8 24 26
9 27 29
10 28 31
11 32 34
12 30 33
8561 17118 25675
8562 17119 25676
8563 17120 25677
8564 17121 25678
8565 17122 25679
8566 17123 25680
8567 17124 25681
8568 17125 25682
8569 17126 25683
8570 17127 25684
8571 17128 25685
8572 17129 25686...

result:

ok OK 11410 triangles!

Test #26:

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

input:

10000

output:

3333
2 15 16
3 17 18
4 19 20
5 21 22
6 23 24
7 25 26
8 27 29
9 28 30
10 31 33
11 32 34
12 35 38
13 36 39
14 37 40
2501 5001 7501
2502 5002 7502
2503 5003 7503
2504 5004 7504
2505 5005 7505
2506 5006 7506
2507 5007 7507
2508 5008 7508
2509 5009 7509
2510 5010 7510
2511 5011 7511
2512 5012 7512
2513 5...

result:

ok OK 3333 triangles!

Test #27:

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

input:

8370

output:

2789
2 13 14
3 15 16
4 17 18
5 19 20
6 21 22
7 23 25
8 24 26
9 27 29
10 28 30
11 31 33
2095 4187 6279
2096 4188 6280
2097 4189 6281
2098 4190 6282
2099 4191 6283
2100 4192 6284
2101 4193 6285
2102 4194 6286
2103 4195 6287
2104 4196 6288
2105 4197 6289
2106 4198 6290
2107 4199 6291
2108 4200 6292
210...

result:

ok OK 2789 triangles!

Test #28:

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

input:

5858

output:

1952
2 9 10
3 11 12
4 13 14
5 15 16
6 17 19
7 18 20
8 21 23
1467 2931 4395
1468 2932 4396
1469 2933 4397
1470 2934 4398
1471 2935 4399
1472 2936 4400
1473 2937 4401
1474 2938 4402
1475 2939 4403
1476 2940 4404
1477 2941 4405
1478 2942 4406
1479 2943 4407
1480 2944 4408
1481 2945 4409
1482 2946 4410
...

result:

ok OK 1952 triangles!

Test #29:

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

input:

688

output:

229
2 6 7
3 8 9
4 10 12
5 11 13
173 345 517
174 346 518
175 347 519
176 348 520
177 349 521
178 350 522
179 351 523
180 352 524
181 353 525
182 354 526
183 355 527
184 356 528
185 357 529
186 358 530
187 359 531
188 360 532
189 361 533
190 362 534
191 363 535
192 364 536
193 365 537
194 366 538
195 ...

result:

ok OK 229 triangles!

Test #30:

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

input:

6480

output:

2159
2 11 12
3 13 14
4 15 16
5 17 18
6 19 20
7 21 23
8 22 24
9 25 27
1621 3241 4861
1622 3242 4862
1623 3243 4863
1624 3244 4864
1625 3245 4865
1626 3246 4866
1627 3247 4867
1628 3248 4868
1629 3249 4869
1630 3250 4870
1631 3251 4871
1632 3252 4872
1633 3253 4873
1634 3254 4874
1635 3255 4875
1636 3...

result:

ok OK 2159 triangles!

Test #31:

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

input:

1000

output:

333
2 7 8
3 9 10
4 11 12
5 13 15
6 14 16
251 501 751
252 502 752
253 503 753
254 504 754
255 505 755
256 506 756
257 507 757
258 508 758
259 509 759
260 510 760
261 511 761
262 512 762
263 513 763
264 514 764
265 515 765
266 516 766
267 517 767
268 518 768
269 519 769
270 520 770
271 521 771
272 522...

result:

ok OK 333 triangles!

Test #32:

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

input:

491

output:

163
2 12 13
3 14 15
4 16 17
5 18 19
6 20 21
7 22 24
8 23 25
9 26 28
10 27 29
11 30 32
126 248 370
127 249 371
128 250 372
129 251 373
130 252 374
131 253 375
132 254 376
133 255 377
134 256 378
135 257 379
136 258 380
137 259 381
138 260 382
139 261 383
140 262 384
141 263 385
142 264 386
143 265 38...

result:

ok OK 163 triangles!

Test #33:

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

input:

667

output:

222
2 6 7
3 8 9
4 10 12
5 11 13
170 336 502
171 337 503
172 338 504
173 339 505
174 340 506
175 341 507
176 342 508
177 343 509
178 344 510
179 345 511
180 346 512
181 347 513
182 348 514
183 349 515
184 350 516
185 351 517
186 352 518
187 353 519
188 354 520
189 355 521
190 356 522
191 357 523
192 ...

result:

ok OK 222 triangles!

Test #34:

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

input:

63

output:

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

result:

ok OK 20 triangles!

Test #35:

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

input:

682

output:

227
2 6 7
3 8 9
4 10 12
5 11 13
173 343 513
174 344 514
175 345 515
176 346 516
177 347 517
178 348 518
179 349 519
180 350 520
181 351 521
182 352 522
183 353 523
184 354 524
185 355 525
186 356 526
187 357 527
188 358 528
189 359 529
190 360 530
191 361 531
192 362 532
193 363 533
194 364 534
195 ...

result:

ok OK 227 triangles!

Test #36:

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

input:

100

output:

33
2 10 11
3 12 13
4 14 15
5 16 17
6 18 19
7 20 22
8 21 24
9 23 25
26 51 76
27 52 77
28 53 78
29 54 79
30 55 80
31 56 81
32 57 82
33 58 83
34 59 84
35 60 85
36 61 86
37 62 87
38 63 88
39 64 89
40 65 90
41 66 91
42 67 92
43 68 93
44 69 94
45 70 95
46 71 96
47 72 97
48 73 98
49 74 99
50 75 100

result:

ok OK 33 triangles!

Test #37:

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

input:

38

output:

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

result:

ok OK 12 triangles!

Test #38:

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

input:

167

output:

55
2 5 6
3 7 8
4 9 10
45 86 127
46 87 128
47 88 129
48 89 130
49 90 131
50 91 132
51 92 133
52 93 134
53 94 135
54 95 136
55 96 137
56 97 138
57 98 139
58 99 140
59 100 141
60 101 142
61 102 143
62 103 144
63 104 145
64 105 146
65 106 147
66 107 148
67 108 149
68 109 150
69 110 151
70 111 152
71 112...

result:

ok OK 55 triangles!

Test #39:

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

input:

34

output:

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

result:

ok OK 11 triangles!