QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#307869#7526. Credit Cardsucup-team2880#AC ✓30ms3948kbC++20361b2024-01-19 10:50:092024-01-19 10:50:10

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

3

output:

0

result:

ok OK 0 triangles!

Test #2:

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

input:

4

output:

1
2 3 4

result:

ok OK 1 triangles!

Test #3:

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

input:

9

output:

2
2 4 5
3 6 7

result:

ok OK 2 triangles!

Test #4:

score: 0
Accepted
time: 24ms
memory: 3944kb

input:

1000000

output:

333333
2 500001 500002
4 500000 500003
6 499999 500004
8 499998 500005
10 499997 500006
12 499996 500007
14 499995 500008
16 499994 500009
18 499993 500010
20 499992 500011
22 499991 500012
24 499990 500013
26 499989 500014
28 499988 500015
30 499987 500016
32 499986 500017
34 499985 500018
36 49998...

result:

ok OK 333333 triangles!

Test #5:

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

input:

1

output:

0

result:

ok OK 0 triangles!

Test #6:

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

input:

2

output:

0

result:

ok OK 0 triangles!

Test #7:

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

input:

5

output:

1
2 3 4

result:

ok OK 1 triangles!

Test #8:

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

input:

6

output:

1
2 3 4

result:

ok OK 1 triangles!

Test #9:

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

input:

7

output:

2
2 4 5
3 6 7

result:

ok OK 2 triangles!

Test #10:

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

input:

8

output:

2
2 4 5
3 6 7

result:

ok OK 2 triangles!

Test #11:

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

input:

10

output:

3
2 6 7
4 5 8
3 9 10

result:

ok OK 3 triangles!

Test #12:

score: 0
Accepted
time: 23ms
memory: 3940kb

input:

621316

output:

207105
2 310659 310660
4 310658 310661
6 310657 310662
8 310656 310663
10 310655 310664
12 310654 310665
14 310653 310666
16 310652 310667
18 310651 310668
20 310650 310669
22 310649 310670
24 310648 310671
26 310647 310672
28 310646 310673
30 310645 310674
32 310644 310675
34 310643 310676
36 31064...

result:

ok OK 207105 triangles!

Test #13:

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

input:

713171

output:

237723
2 356586 356587
4 356585 356588
6 356584 356589
8 356583 356590
10 356582 356591
12 356581 356592
14 356580 356593
16 356579 356594
18 356578 356595
20 356577 356596
22 356576 356597
24 356575 356598
26 356574 356599
28 356573 356600
30 356572 356601
32 356571 356602
34 356570 356603
36 35656...

result:

ok OK 237723 triangles!

Test #14:

score: 0
Accepted
time: 30ms
memory: 3796kb

input:

825609

output:

275202
2 412804 412805
4 412803 412806
6 412802 412807
8 412801 412808
10 412800 412809
12 412799 412810
14 412798 412811
16 412797 412812
18 412796 412813
20 412795 412814
22 412794 412815
24 412793 412816
26 412792 412817
28 412791 412818
30 412790 412819
32 412789 412820
34 412788 412821
36 41278...

result:

ok OK 275202 triangles!

Test #15:

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

input:

782282

output:

260760
2 391141 391142
4 391140 391143
6 391139 391144
8 391138 391145
10 391137 391146
12 391136 391147
14 391135 391148
16 391134 391149
18 391133 391150
20 391132 391151
22 391131 391152
24 391130 391153
26 391129 391154
28 391128 391155
30 391127 391156
32 391126 391157
34 391125 391158
36 39112...

result:

ok OK 260760 triangles!

Test #16:

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

input:

148128

output:

49375
2 74064 74065
4 74063 74066
6 74062 74067
8 74061 74068
10 74060 74069
12 74059 74070
14 74058 74071
16 74057 74072
18 74056 74073
20 74055 74074
22 74054 74075
24 74053 74076
26 74052 74077
28 74051 74078
30 74050 74079
32 74049 74080
34 74048 74081
36 74047 74082
38 74046 74083
40 74045 7408...

result:

ok OK 49375 triangles!

Test #17:

score: 0
Accepted
time: 25ms
memory: 3748kb

input:

681282

output:

227093
2 340641 340642
4 340640 340643
6 340639 340644
8 340638 340645
10 340637 340646
12 340636 340647
14 340635 340648
16 340634 340649
18 340633 340650
20 340632 340651
22 340631 340652
24 340630 340653
26 340629 340654
28 340628 340655
30 340627 340656
32 340626 340657
34 340625 340658
36 34062...

result:

ok OK 227093 triangles!

Test #18:

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

input:

798547

output:

266182
2 399274 399275
4 399273 399276
6 399272 399277
8 399271 399278
10 399270 399279
12 399269 399280
14 399268 399281
16 399267 399282
18 399266 399283
20 399265 399284
22 399264 399285
24 399263 399286
26 399262 399287
28 399261 399288
30 399260 399289
32 399259 399290
34 399258 399291
36 39925...

result:

ok OK 266182 triangles!

Test #19:

score: 0
Accepted
time: 13ms
memory: 3860kb

input:

349290

output:

116429
2 174645 174646
4 174644 174647
6 174643 174648
8 174642 174649
10 174641 174650
12 174640 174651
14 174639 174652
16 174638 174653
18 174637 174654
20 174636 174655
22 174635 174656
24 174634 174657
26 174633 174658
28 174632 174659
30 174631 174660
32 174630 174661
34 174629 174662
36 17462...

result:

ok OK 116429 triangles!

Test #20:

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

input:

317275

output:

105758
2 158638 158639
4 158637 158640
6 158636 158641
8 158635 158642
10 158634 158643
12 158633 158644
14 158632 158645
16 158631 158646
18 158630 158647
20 158629 158648
22 158628 158649
24 158627 158650
26 158626 158651
28 158625 158652
30 158624 158653
32 158623 158654
34 158622 158655
36 15862...

result:

ok OK 105758 triangles!

Test #21:

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

input:

100000

output:

33333
2 50001 50002
4 50000 50003
6 49999 50004
8 49998 50005
10 49997 50006
12 49996 50007
14 49995 50008
16 49994 50009
18 49993 50010
20 49992 50011
22 49991 50012
24 49990 50013
26 49989 50014
28 49988 50015
30 49987 50016
32 49986 50017
34 49985 50018
36 49984 50019
38 49983 50020
40 49982 5002...

result:

ok OK 33333 triangles!

Test #22:

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

input:

83568

output:

27855
2 41784 41785
4 41783 41786
6 41782 41787
8 41781 41788
10 41780 41789
12 41779 41790
14 41778 41791
16 41777 41792
18 41776 41793
20 41775 41794
22 41774 41795
24 41773 41796
26 41772 41797
28 41771 41798
30 41770 41799
32 41769 41800
34 41768 41801
36 41767 41802
38 41766 41803
40 41765 4180...

result:

ok OK 27855 triangles!

Test #23:

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

input:

41476

output:

13825
2 20739 20740
4 20738 20741
6 20737 20742
8 20736 20743
10 20735 20744
12 20734 20745
14 20733 20746
16 20732 20747
18 20731 20748
20 20730 20749
22 20729 20750
24 20728 20751
26 20727 20752
28 20726 20753
30 20725 20754
32 20724 20755
34 20723 20756
36 20722 20757
38 20721 20758
40 20720 2075...

result:

ok OK 13825 triangles!

Test #24:

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

input:

61028

output:

20342
2 30514 30515
4 30513 30516
6 30512 30517
8 30511 30518
10 30510 30519
12 30509 30520
14 30508 30521
16 30507 30522
18 30506 30523
20 30505 30524
22 30504 30525
24 30503 30526
26 30502 30527
28 30501 30528
30 30500 30529
32 30499 30530
34 30498 30531
36 30497 30532
38 30496 30533
40 30495 3053...

result:

ok OK 20342 triangles!

Test #25:

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

input:

34231

output:

11410
2 17116 17117
4 17115 17118
6 17114 17119
8 17113 17120
10 17112 17121
12 17111 17122
14 17110 17123
16 17109 17124
18 17108 17125
20 17107 17126
22 17106 17127
24 17105 17128
26 17104 17129
28 17103 17130
30 17102 17131
32 17101 17132
34 17100 17133
36 17099 17134
38 17098 17135
40 17097 1713...

result:

ok OK 11410 triangles!

Test #26:

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

input:

10000

output:

3333
2 5001 5002
4 5000 5003
6 4999 5004
8 4998 5005
10 4997 5006
12 4996 5007
14 4995 5008
16 4994 5009
18 4993 5010
20 4992 5011
22 4991 5012
24 4990 5013
26 4989 5014
28 4988 5015
30 4987 5016
32 4986 5017
34 4985 5018
36 4984 5019
38 4983 5020
40 4982 5021
42 4981 5022
44 4980 5023
46 4979 5024
...

result:

ok OK 3333 triangles!

Test #27:

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

input:

8370

output:

2789
2 4185 4186
4 4184 4187
6 4183 4188
8 4182 4189
10 4181 4190
12 4180 4191
14 4179 4192
16 4178 4193
18 4177 4194
20 4176 4195
22 4175 4196
24 4174 4197
26 4173 4198
28 4172 4199
30 4171 4200
32 4170 4201
34 4169 4202
36 4168 4203
38 4167 4204
40 4166 4205
42 4165 4206
44 4164 4207
46 4163 4208
...

result:

ok OK 2789 triangles!

Test #28:

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

input:

5858

output:

1952
2 2929 2930
4 2928 2931
6 2927 2932
8 2926 2933
10 2925 2934
12 2924 2935
14 2923 2936
16 2922 2937
18 2921 2938
20 2920 2939
22 2919 2940
24 2918 2941
26 2917 2942
28 2916 2943
30 2915 2944
32 2914 2945
34 2913 2946
36 2912 2947
38 2911 2948
40 2910 2949
42 2909 2950
44 2908 2951
46 2907 2952
...

result:

ok OK 1952 triangles!

Test #29:

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

input:

688

output:

229
2 345 346
4 344 347
6 343 348
8 342 349
10 341 350
12 340 351
14 339 352
16 338 353
18 337 354
20 336 355
22 335 356
24 334 357
26 333 358
28 332 359
30 331 360
32 330 361
34 329 362
36 328 363
38 327 364
40 326 365
42 325 366
44 324 367
46 323 368
48 322 369
50 321 370
52 320 371
54 319 372
56 ...

result:

ok OK 229 triangles!

Test #30:

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

input:

6480

output:

2159
2 3240 3241
4 3239 3242
6 3238 3243
8 3237 3244
10 3236 3245
12 3235 3246
14 3234 3247
16 3233 3248
18 3232 3249
20 3231 3250
22 3230 3251
24 3229 3252
26 3228 3253
28 3227 3254
30 3226 3255
32 3225 3256
34 3224 3257
36 3223 3258
38 3222 3259
40 3221 3260
42 3220 3261
44 3219 3262
46 3218 3263
...

result:

ok OK 2159 triangles!

Test #31:

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

input:

1000

output:

333
2 501 502
4 500 503
6 499 504
8 498 505
10 497 506
12 496 507
14 495 508
16 494 509
18 493 510
20 492 511
22 491 512
24 490 513
26 489 514
28 488 515
30 487 516
32 486 517
34 485 518
36 484 519
38 483 520
40 482 521
42 481 522
44 480 523
46 479 524
48 478 525
50 477 526
52 476 527
54 475 528
56 ...

result:

ok OK 333 triangles!

Test #32:

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

input:

491

output:

163
2 246 247
4 245 248
6 244 249
8 243 250
10 242 251
12 241 252
14 240 253
16 239 254
18 238 255
20 237 256
22 236 257
24 235 258
26 234 259
28 233 260
30 232 261
32 231 262
34 230 263
36 229 264
38 228 265
40 227 266
42 226 267
44 225 268
46 224 269
48 223 270
50 222 271
52 221 272
54 220 273
56 ...

result:

ok OK 163 triangles!

Test #33:

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

input:

667

output:

222
2 334 335
4 333 336
6 332 337
8 331 338
10 330 339
12 329 340
14 328 341
16 327 342
18 326 343
20 325 344
22 324 345
24 323 346
26 322 347
28 321 348
30 320 349
32 319 350
34 318 351
36 317 352
38 316 353
40 315 354
42 314 355
44 313 356
46 312 357
48 311 358
50 310 359
52 309 360
54 308 361
56 ...

result:

ok OK 222 triangles!

Test #34:

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

input:

63

output:

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

result:

ok OK 20 triangles!

Test #35:

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

input:

682

output:

227
2 342 343
4 341 344
6 340 345
8 339 346
10 338 347
12 337 348
14 336 349
16 335 350
18 334 351
20 333 352
22 332 353
24 331 354
26 330 355
28 329 356
30 328 357
32 327 358
34 326 359
36 325 360
38 324 361
40 323 362
42 322 363
44 321 364
46 320 365
48 319 366
50 318 367
52 317 368
54 316 369
56 ...

result:

ok OK 227 triangles!

Test #36:

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

input:

100

output:

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

result:

ok OK 33 triangles!

Test #37:

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

input:

38

output:

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

result:

ok OK 12 triangles!

Test #38:

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

input:

167

output:

55
2 84 85
4 83 86
6 82 87
8 81 88
10 80 89
12 79 90
14 78 91
16 77 92
18 76 93
20 75 94
22 74 95
24 73 96
26 72 97
28 71 98
30 70 99
32 69 100
34 68 101
36 67 102
38 66 103
40 65 104
42 64 105
44 63 106
46 62 107
48 61 108
50 60 109
52 59 110
54 58 111
56 57 112
3 139 140
5 138 141
7 137 142
9 136 ...

result:

ok OK 55 triangles!

Test #39:

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

input:

34

output:

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

result:

ok OK 11 triangles!