-
Notifications
You must be signed in to change notification settings - Fork 567
/
test.js
505 lines (405 loc) · 88.3 KB
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
const assert = require('assert');
Object.freeze(assert);
const getLoveTrianglesCount = require('./src/index');
describe('Love triangles', () => {
it('1', () => {
const count = getLoveTrianglesCount([2, 3, 1]);
assert.equal(count, 1);
});
it('2', () => {
const count = getLoveTrianglesCount([2, 3, 1, 5, 6, 4]);
assert.equal(count, 2);
});
it('3', () => {
const count = getLoveTrianglesCount([2, 3, 1, 5, 6, 4, 2, 3, 1, 5, 6, 4, 2, 3, 1, 5, 6, 4]);
assert.equal(count, 2);
});
it('4', () => {
const count = getLoveTrianglesCount([3, 3, 3, 3, 3, 3, 3, 3]);
assert.equal(count, 0);
});
it('5', () => {
const count = getLoveTrianglesCount([4, 5, 6, 5, 5, 6]);
assert.equal(count, 0);
});
it('6', () => {
const count = getLoveTrianglesCount([2, 3, 1, 9, 8, 6, 3, 8, 1, 5]);
assert.equal(count, 1);
});
it('7', () => {
const count = getLoveTrianglesCount([2, 3, 1, 5, 6, 4, 8, 9, 7, 0, 10, 18, 20, 14, 7, 17, 8, 14, 10, 1]);
assert.equal(count, 3);
});
it('8', () => {
const count = getLoveTrianglesCount([2, 3, 1, 5, 6, 4, 8, 9, 7, 11, 12, 10, 13, 9, 13, 2, 15, 13, 12, 11]);
assert.equal(count, 4);
});
it('9', () => {
const count = getLoveTrianglesCount([6, 14, 12, 21, 3, 20, 7, 15, 16, 16, 14, 4, 11, 13, 18, 2, 1, 8, 3, 1, 12]);
assert.equal(count, 4);
});
it('10', () => {
const count = getLoveTrianglesCount([23, 15, 37, 5, 20, 20, 25, 34, 10, 15, 6, 31, 14, 16, 9, 13, 12, 23, 24, 4, 28, 1, 38, 41, 29, 27, 34, 21, 7, 23, 17, 30, 7, 26, 33, 14, 40, 1, 39, 18, 19]);
assert.equal(count, 8);
});
it('11', () => {
const count = getLoveTrianglesCount([3, 9, 12, 6, 13, 16, 15, 3, 14, 5, 4, 1, 10, 2, 4, 4, 10, 14, 11]);
assert.equal(count, 4);
});
it('12', () => {
const count = getLoveTrianglesCount([3, 2, 0, 5, 5, 7, 2]);
assert.equal(count, 0);
});
it('13', () => {
const count = getLoveTrianglesCount([63, 42, 134, 107, 369, 362, 309, 94, 301, 154, 40, 47, 126, 262, 285, 162, 193, 157, 77, 184, 266, 233, 341, 317, 220, 300, 347, 181, 19, 52, 222, 358, 114, 370, 250, 185, 271, 143, 27, 325, 183, 224, 51, 222, 67, 267, 254, 60, 65, 289, 303, 169, 365, 171, 240, 80, 46, 35, 53, 151, 146, 4, 205, 363, 144, 152, 86, 291, 333, 318, 199, 13, 357, 348, 90, 186, 29, 127, 82, 293, 275, 321, 155, 182, 84, 45, 116, 206, 344, 270, 247, 366, 60, 295, 125, 162, 316, 159, 33, 123, 349, 292, 98, 366, 38, 266, 296, 312, 14, 286, 287, 59, 55, 99, 337, 150, 277, 180, 258, 317, 282, 203, 176, 288, 269, 72, 230, 175, 57, 276, 297, 167, 203, 367, 34, 360, 202, 165, 336, 203, 216, 26, 105, 49, 118, 329, 197, 336, 364, 87, 93, 44, 236, 204, 158, 303, 320, 160, 103, 155, 275, 195, 22, 215, 284, 15, 299, 104, 30, 35, 221, 368, 223, 41, 282, 100, 333, 149, 231, 145, 265, 85, 174, 338, 369, 188, 74, 253, 279, 326, 319, 252, 232, 205, 96, 226, 305, 8, 206, 358, 73, 309, 273, 10, 1, 302, 89, 308, 248, 310, 192, 110, 154, 189, 25, 263, 123, 23, 124, 215, 54, 152, 303, 2, 363, 241, 136, 50, 322, 78, 266, 17, 163, 111, 343, 308, 68, 44, 119, 113, 306, 190, 6, 273, 201, 126, 355, 353, 260, 58, 294, 211, 186, 12, 145, 134, 138, 239, 153, 326, 32, 109, 141, 356, 28, 179, 148, 354, 95, 75, 332, 268, 133, 70, 319, 326, 334, 9, 214, 356, 229, 128, 62, 138, 166, 212, 234, 219, 228, 364, 237, 311, 56, 342, 8, 4, 361, 51, 132, 238, 316, 199, 173, 306, 147, 226, 5, 153, 137, 313, 324, 345, 210, 30, 364, 9, 331, 274, 81, 18, 79, 281, 162, 292, 11, 242, 101, 235, 61, 172, 24, 37, 340, 117, 149, 267, 64, 20, 280, 177, 218, 251, 328, 207, 108, 11, 39, 187, 327, 41, 275, 342, 209, 272, 91, 339, 201, 261, 73, 227, 131, 243, 337, 178, 59, 168, 3, 330, 307, 135]);
assert.equal(count, 99);
});
it('14', () => {
const count = getLoveTrianglesCount([19, 23, 20, 22, 7, 38, 36, 4, 17, 21, 15, 8, 9, 6, 18, 7, 21, 20, 2, 30, 37, 8, 32, 2, 27, 37, 23, 1, 21, 18, 16, 27, 36, 8, 2, 15, 10, 14]);
assert.equal(count, 5);
});
it('15', () => {
const count = getLoveTrianglesCount([42, 10, 2, 42, 37, 2, 35, 25, 46, 7, 41, 44, 37, 33, 44, 38, 16, 4, 1, 8, 45, 7, 31, 30, 20, 20, 27, 9, 23, 33, 29, 12, 24, 43, 22, 3, 29, 35, 4, 6, 45, 39, 22, 7, 11, 28]);
assert.equal(count, 7);
});
it('16', () => {
const count = getLoveTrianglesCount([180, 108, 149, 177, 253, 347, 69, 109, 98, 60, 246, 208, 170, 39, 151, 385, 305, 218, 215, 115, 284, 267, 125, 61, 373, 88, 97, 338, 250, 222, 226, 96, 345, 319, 217, 272, 50, 117, 175, 230, 384, 185, 75, 12, 259, 296, 298, 204, 41, 200, 248, 211, 241, 186, 166, 111, 46, 360, 94, 386, 78, 255, 158, 196, 20, 362, 32, 92, 352, 323, 379, 334, 231, 258, 257, 63, 295, 24, 134, 70, 355, 30, 351, 133, 42, 236, 283, 316, 251, 353, 17, 244, 302, 126, 175, 67, 303, 378, 268, 320, 55, 131, 113, 54, 287, 317, 102, 237, 266, 19, 201, 307, 120, 288, 65, 341, 372, 275, 1, 103, 254, 271, 16, 187, 321, 59, 260, 354, 249, 179, 234, 199, 232, 292, 100, 6, 58, 139, 280, 309, 346, 371, 3, 18, 66, 62, 308, 129, 143, 15, 150, 51, 53, 336, 29, 154, 285, 76, 77, 99, 276, 289, 333, 216, 162, 101, 86, 93, 130, 329, 73, 377, 262, 114, 14, 35, 197, 274, 169, 119, 356, 229, 367, 178, 85, 104, 299, 33, 202, 132, 203, 273, 90, 387, 359, 270, 4, 277, 190, 37, 56, 263, 369, 330, 260, 294, 105, 44, 327, 306, 261, 141, 205, 87, 110, 233, 176, 144, 74, 89, 324, 82, 311, 118, 140, 348, 45, 343, 282, 337, 171, 84, 164, 102, 332, 167, 2, 121, 47, 142, 153, 252, 72, 68, 173, 325, 286, 152, 148, 155, 220, 291, 358, 238, 146, 209, 43, 219, 227, 213, 52, 245, 189, 381, 36, 8, 328, 160, 147, 64, 304, 265, 375, 184, 224, 383, 382, 194, 83, 138, 183, 182, 214, 315, 363, 314, 207, 174, 165, 313, 242, 79, 114, 339, 159, 57, 228, 239, 124, 116, 264, 168, 27, 122, 91, 326, 370, 269, 225, 128, 335, 28, 322, 247, 21, 26, 380, 195, 364, 135, 23, 290, 80, 366, 11, 210, 256, 22, 13, 48, 181, 350, 361, 243, 223, 156, 40, 312, 206, 172, 300, 357, 297, 71, 188, 212, 136, 31, 63, 235, 279, 7, 193, 310, 365, 331, 368, 5, 318, 137, 163, 145, 157, 34, 81, 221, 281, 342, 191, 112, 240, 38, 376, 1, 192, 25, 340, 9, 344, 106, 301, 198, 161, 49, 123, 10, 278]);
assert.equal(count, 127);
});
it('17', () => {
const count = getLoveTrianglesCount([21, 96, 49, 55, 7, 24, 126, 132, 88, 59, 67, 115, 11, 78, 23, 33, 90, 129, 80, 45, 23, 20, 110, 48, 116, 82, 90, 76, 134, 19, 57, 76, 99, 57, 6, 70, 24, 92, 113, 6, 99, 77, 39, 14, 22, 53, 25, 18, 29, 8, 31, 94, 63, 30, 28, 59, 92, 54, 18, 80, 36, 132, 80, 93, 83, 78, 13, 79, 9, 115, 62, 70, 43, 54, 109, 115, 104, 35, 19, 79, 94, 89, 126, 61, 6, 92, 38, 9, 44, 12, 9, 15, 52, 14, 127, 123, 16, 120, 14, 135, 88, 113, 37, 68, 130, 2, 91, 126, 24, 80, 135, 129, 2, 81, 72, 36, 13, 128, 55, 105, 79, 133, 76, 1, 4, 65, 30, 58, 128, 87, 130, 20, 4, 61, 98]);
assert.equal(count, 5);
});
it('18', () => {
const count = getLoveTrianglesCount([71, 101, 127, 139, 187, 159, 16, 45, 88, 196, 8, 165, 12, 42, 19, 88, 112, 79, 64, 70, 197, 168, 54, 113, 122, 74, 149, 93, 121, 91, 94, 113, 2, 113, 4, 41, 89, 121, 198, 84, 128, 149, 200, 212, 80, 71, 62, 75, 193, 133, 186, 67, 40, 38, 103, 209, 93, 112, 202, 99, 216, 82, 127, 197, 25, 215, 78, 115, 152, 74, 204, 117, 186, 87, 201, 91, 66, 108, 93, 8, 187, 98, 136, 53, 116, 14, 33, 7, 131, 114, 121, 140, 54, 59, 35, 9, 6, 62, 192, 22, 157, 201, 21, 194, 5, 30, 127, 67, 215, 205, 40, 174, 186, 86, 144, 91, 54, 23, 86, 190, 214, 20, 95, 110, 166, 68, 198, 127, 144, 120, 122, 45, 21, 135, 194, 179, 211, 8, 35, 156, 13, 85, 198, 193, 1, 114, 12, 214, 138, 68, 39, 133, 184, 4, 102, 76, 203, 45, 97, 193, 103, 213, 87, 26, 22, 77, 151, 100, 83, 61, 173, 6, 11, 136, 1, 80, 46, 11, 47, 77, 199, 73, 10, 10, 3, 196, 105, 61, 50, 62, 24, 56, 129, 196, 66, 183, 133, 3, 178, 83, 69, 94, 101, 1, 124, 2, 39, 129, 192, 8, 50, 191, 114, 91, 153, 170]);
assert.equal(count, 20);
});
it('19', () => {
const count = getLoveTrianglesCount([73, 219, 256, 21, 238, 94, 240, 149, 167, 153, 103, 59, 235, 2, 106, 237, 44, 86, 302, 37, 286, 245, 126, 209, 9, 16, 229, 169, 150, 232, 11, 315, 213, 85, 182, 241, 162, 205, 292, 223, 105, 95, 156, 175, 278, 288, 233, 203, 183, 147, 132, 90, 166, 202, 178, 137, 125, 18, 225, 285, 255, 83, 68, 67, 296, 30, 164, 304, 247, 201, 27, 41, 184, 124, 250, 75, 231, 133, 318, 323, 28, 170, 123, 19, 253, 58, 298, 267, 157, 204, 325, 55, 214, 324, 196, 180, 128, 207, 212, 70, 48, 98, 31, 38, 72, 127, 193, 270, 29, 234, 61, 139, 40, 195, 268, 272, 78, 13, 140, 301, 199, 141, 62, 160, 226, 228, 15, 192, 33, 51, 88, 130, 117, 110, 99, 120, 197, 47, 208, 191, 313, 39, 24, 307, 163, 79, 194, 87, 22, 109, 110, 53, 154, 10, 115, 276, 206, 49, 246, 74, 306, 20, 294, 64, 284, 152, 25, 173, 81, 289, 259, 248, 310, 144, 17, 215, 96, 92, 308, 177, 262, 312, 158, 1, 107, 314, 179, 121, 161, 285, 119, 97, 185, 50, 200, 42, 56, 320, 188, 114, 100, 321, 101, 52, 104, 89, 102, 112, 143, 311, 300, 135, 129, 273, 274, 257, 286, 221, 14, 275, 243, 69, 113, 216, 12, 57, 73, 23, 71, 210, 297, 66, 138, 134, 118, 327, 26, 263, 91, 269, 258, 295, 218, 165, 149, 316, 222, 252, 319, 76, 283, 172, 34, 3, 111, 254, 224, 36, 279, 108, 181, 261, 5, 60, 46, 242, 131, 155, 7, 260, 80, 280, 93, 176, 277, 43, 220, 291, 171, 116, 317, 249, 303, 244, 264, 4, 65, 265, 82, 211, 45, 142, 198, 145, 266, 287, 77, 148, 236, 290, 136, 84, 251, 63, 32, 189, 174, 187, 281, 168, 230, 35, 122, 322, 305, 159, 309, 146, 282, 293, 54, 186, 271, 6, 239, 135, 299]);
assert.equal(count, 107);
});
it('20', () => {
const count = getLoveTrianglesCount([24, 24, 4, 16, 40, 32, 3, 26, 22, 30, 42, 26, 5, 5, 29, 30, 31, 45, 13, 21, 41, 6, 46, 39, 42, 42, 5, 23, 37, 4, 4, 22, 27, 44, 28, 33, 15, 34, 1, 13, 20, 43, 25, 38, 47, 28, 18]);
assert.equal(count, 10);
});
it('21', () => {
const count = getLoveTrianglesCount([96, 71, 23, 55, 53, 1, 137, 60, 45, 100, 27, 102, 46, 26, 29, 20, 97, 25, 16, 19, 23, 34, 81, 112, 101, 10, 132, 105, 95, 9, 73, 9, 77, 19, 67, 71, 129, 48, 55, 28, 104, 90, 32, 49, 30, 88, 131, 122, 132, 63, 13, 53, 6, 36, 111, 22, 64, 35, 110, 134, 40, 54, 105, 113, 129, 64, 25, 114, 83, 117, 130, 7, 133, 88, 1, 28, 40, 64, 26, 12, 3, 46, 28, 42, 53, 68, 80, 92, 128, 84, 26, 71, 10, 110, 92, 6, 136, 107, 125, 93, 18, 80, 117, 27, 76, 138, 31, 134, 52, 64, 39, 58, 55, 89, 19, 113, 17, 8, 111, 44, 29, 118, 11, 10, 65, 8, 51, 10, 33, 2, 17, 11, 31, 8, 117, 17, 72, 14]);
assert.equal(count, 16);
});
it('22', () => {
const count = getLoveTrianglesCount([205, 187, 27, 67, 219, 32, 89, 94, 62, 120, 93, 138, 53, 97, 207, 234, 47, 2, 128, 174, 67, 160, 211, 134, 154, 83, 253, 146, 3, 160, 66, 184, 89, 76, 181, 104, 186, 136, 95, 15, 176, 247, 39, 102, 19, 102, 207, 248, 23, 217, 141, 81, 227, 202, 98, 184, 72, 152, 68, 27, 198, 68, 108, 190, 187, 28, 230, 42, 60, 209, 207, 34, 192, 84, 212, 28, 46, 120, 222, 133, 140, 24, 164, 212, 232, 69, 93, 81, 140, 127, 177, 160, 77, 101, 208, 154, 188, 57, 57, 225, 156, 77, 140, 175, 144, 201, 128, 52, 18, 177, 206, 78, 205, 77, 192, 230, 51, 125, 79, 80, 119, 4, 230, 32, 98, 207, 180, 32, 108, 1, 188, 117, 101, 138, 83, 179, 117, 89, 2, 7, 111, 120, 129, 2, 95, 231, 176, 141, 220, 15, 214, 20, 207, 75, 30, 182, 61, 48, 250, 155, 80, 2, 237, 100, 109, 121, 164, 0, 61, 201, 126, 20, 21, 172, 59, 115, 8, 136, 38, 174, 219, 101, 202, 128, 253, 142, 173, 165, 2, 171, 147, 176, 17, 149, 199, 54, 78, 211, 15, 94, 38, 160, 70, 81, 130, 137, 17, 73, 61, 192, 176, 228, 116, 219, 232, 136, 137, 243, 35, 33, 131, 163, 239, 7, 238, 207, 64, 55, 217, 0, 189, 47, 159, 170, 150, 208, 227, 115, 34, 157, 220, 249, 36, 209, 94, 15, 195, 56, 187, 233, 229, 117, 201]);
assert.equal(count, 12);
});
it('23', () => {
const count = getLoveTrianglesCount([43, 153, 176, 167, 167, 98, 261, 228, 265, 256, 23, 280, 31, 96, 267, 206, 165, 112, 57, 63, 18, 5, 245, 103, 282, 141, 179, 81, 49, 110, 129, 188, 33, 142, 153, 7, 222, 210, 88, 38, 227, 189, 32, 203, 186, 169, 156, 240, 283, 100, 281, 150, 233, 99, 198, 155, 18, 27, 105, 276, 207, 104, 144, 88, 51, 27, 15, 257, 59, 55, 56, 183, 252, 149, 283, 96, 221, 2, 146, 120, 183, 85, 269, 136, 92, 49, 119, 132, 95, 38, 25, 10, 276, 155, 213, 243, 132, 130, 231, 162, 281, 139, 16, 145, 69, 126, 32, 77, 37, 44, 258, 21, 23, 186, 273, 255, 279, 124, 181, 182, 251, 105, 232, 68, 131, 159, 234, 100, 13, 154, 248, 39, 220, 166, 24, 160, 37, 194, 202, 246, 6, 186, 275, 20, 175, 226, 69, 4, 273, 72, 83, 279, 227, 98, 222, 55, 126, 141, 157, 84, 143, 50, 20, 121, 201, 211, 108, 89, 201, 260, 262, 125, 140, 60, 104, 211, 121, 7, 58, 121, 229, 285, 198, 105, 174, 34, 268, 278, 261, 214, 272, 100, 132, 128, 98, 31, 88, 156, 84, 102, 17, 102, 204, 256, 141, 280, 235, 189, 238, 40, 3, 32, 65, 263, 264, 14, 193, 241, 167, 102, 196, 75, 117, 134, 73, 277, 35, 244, 254, 199, 54, 22, 197, 171, 61, 125, 113, 86, 203, 76, 176, 249, 215, 8, 11, 173, 196, 233, 102, 208, 164, 225, 157, 22, 57, 92, 9, 214, 233, 114, 208, 10, 84, 93, 97, 174, 25, 281, 151, 168, 270, 192, 74, 203, 161, 174, 262, 226, 223, 16, 255, 228, 222, 87, 120]);
assert.equal(count, 35);
});
it('24', () => {
const count = getLoveTrianglesCount([12, 7, 19, 17, 11, 6, 13, 15, 19, 16, 16, 7, 2, 4, 18, 5, 14, 8, 5, 11]);
assert.equal(count, 4);
});
it('25', () => {
const count = getLoveTrianglesCount([66, 131, 158, 76, 9, 43, 77, 51, 102, 9, 140, 78, 155, 65, 79, 51, 120, 162, 127, 96, 114, 147, 120, 107, 95, 105, 108, 71, 81, 63, 111, 11, 14, 127, 112, 38, 38, 4, 162, 38, 4, 69, 139, 47, 150, 58, 61, 74, 130, 118, 83, 22, 62, 62, 61, 58, 156, 155, 79, 87, 132, 39, 92, 76, 68, 49, 142, 23, 59, 49, 88, 114, 136, 136, 20, 41, 44, 109, 69, 64, 125, 25, 8, 62, 89, 16, 155, 115, 128, 71, 44, 30, 146, 72, 82, 75, 122, 89, 156, 99, 72, 5, 31, 35, 131, 75, 116, 28, 12, 2, 103, 46, 93, 126, 71, 24, 152, 85, 137, 97, 16, 133, 60, 78, 29, 22, 108, 85, 78, 70, 26, 118, 93, 112, 57, 48, 3, 70, 131, 102, 16, 2, 101, 117, 135, 133, 44, 16, 85, 134, 67, 144, 47, 43, 46, 100, 135, 137, 143, 19, 25, 62]);
assert.equal(count, 22);
});
it('26', () => {
const count = getLoveTrianglesCount([135, 196, 46, 149, 86, 172, 11, 98, 270, 30, 258, 47, 220, 333, 122, 238, 324, 91, 100, 86, 93, 241, 18, 310, 132, 105, 92, 111, 64, 35, 89, 195, 110, 50, 10, 245, 44, 174, 155, 284, 155, 135, 37, 106, 215, 125, 217, 0, 308, 97, 248, 18, 219, 213, 304, 299, 334, 160, 309, 324, 325, 335, 251, 257, 20, 146, 229, 45, 16, 103, 97, 49, 132, 298, 194, 184, 319, 220, 172, 234, 102, 272, 319, 101, 146, 332, 224, 292, 283, 83, 52, 111, 81, 32, 224, 269, 270, 283, 165, 37, 343, 93, 153, 208, 312, 37, 183, 29, 16, 139, 279, 77, 264, 289, 173, 155, 86, 43, 141, 141, 260, 240, 24, 332, 209, 228, 205, 74, 66, 12, 340, 341, 75, 291, 93, 249, 178, 325, 182, 114, 333, 301, 191, 213, 180, 129, 137, 93, 348, 223, 187, 343, 77, 118, 330, 99, 296, 204, 41, 256, 219, 299, 188, 344, 160, 347, 114, 210, 43, 33, 186, 45, 120, 219, 164, 158, 245, 216, 191, 32, 146, 339, 48, 229, 31, 97, 345, 164, 113, 85, 267, 108, 2, 133, 94, 193, 218, 51, 286, 50, 241, 264, 176, 176, 268, 192, 119, 349, 246, 240, 224, 342, 229, 288, 172, 297, 239, 246, 276, 338, 0, 214, 82, 249, 15, 22, 253, 324, 54, 191, 26, 228, 179, 279, 121, 142, 64, 69, 47, 15, 226, 80, 235, 261, 227, 197, 255, 195, 87, 33, 131, 312, 245, 345, 220, 165, 29, 7, 251, 137, 306, 326, 341, 110, 64, 288, 281, 127, 206, 50, 135, 223, 88, 333, 233, 161, 212, 174, 13, 233, 62, 193, 8, 290, 61, 62, 267, 222, 140, 245, 164, 273, 251, 83, 188, 97, 178, 128, 307, 59, 207, 345, 245, 47, 128, 318, 162, 92, 300, 123, 72, 321, 56, 49, 64, 305, 139, 261, 112, 99, 148, 293, 286, 232, 336, 247, 118, 170, 115, 39, 156, 117, 120, 247, 201, 61, 147, 255, 139, 23, 73, 277, 84, 175, 117, 122, 189, 4, 271]);
assert.equal(count, 48);
});
it('27', () => {
const count = getLoveTrianglesCount([66, 89, 164, 0, 141, 88, 28, 40, 46, 23, 37, 144, 77, 141, 23, 145, 158, 3, 128, 15, 31, 74, 53, 156, 160, 23, 124, 105, 117, 138, 69, 112, 115, 78, 79, 19, 65, 45, 80, 97, 97, 159, 144, 118, 145, 93, 64, 73, 16, 55, 153, 142, 95, 164, 140, 126, 44, 97, 115, 88, 96, 7, 63, 158, 94, 72, 111, 85, 21, 159, 96, 111, 79, 104, 131, 70, 98, 33, 48, 66, 12, 137, 96, 132, 10, 70, 132, 111, 75, 42, 53, 103, 62, 37, 91, 83, 153, 8, 108, 105, 105, 87, 130, 22, 7, 110, 30, 103, 24, 87, 164, 103, 129, 52, 116, 33, 123, 57, 118, 158, 161, 9, 29, 126, 103, 144, 36, 32, 58, 108, 89, 102, 134, 122, 100, 159, 110, 66, 49, 143, 58, 114, 55, 105, 38, 121, 3, 3, 128, 93, 105, 78, 40, 34, 69, 109, 117, 47, 90, 87, 62, 39, 137, 88, 163]);
assert.equal(count, 20);
});
it('28', () => {
const count = getLoveTrianglesCount([115, 217, 79, 237, 82, 158, 60, 136, 216, 102, 131, 231, 28, 79, 153, 287, 132, 114, 183, 53, 206, 132, 165, 267, 77, 281, 40, 251, 178, 73, 197, 234, 194, 250, 201, 15, 280, 147, 76, 115, 97, 117, 76, 116, 43, 121, 240, 253, 293, 175, 115, 208, 61, 113, 159, 239, 108, 54, 229, 124, 261, 259, 93, 21, 177, 263, 296, 164, 241, 285, 80, 245, 45, 295, 67, 118, 292, 131, 17, 206, 288, 229, 233, 84, 257, 102, 76, 269, 273, 256, 255, 289, 295, 198, 97, 179, 44, 10, 166, 191, 114, 82, 266, 114, 287, 252, 150, 46, 185, 183, 112, 225, 162, 72, 129, 79, 24, 62, 67, 101, 245, 172, 35, 36, 204, 222, 227, 241, 35, 5, 119, 79, 219, 98, 98, 205, 19, 108, 47, 185, 91, 196, 154, 128, 86, 264, 142, 288, 144, 59, 153, 192, 55, 101, 241, 171, 50, 183, 18, 99, 97, 54, 258, 67, 153, 245, 152, 89, 160, 104, 11, 176, 187, 73, 196, 71, 254, 20, 96, 268, 197, 67, 14, 219, 283, 181, 40, 103, 180, 57, 198, 167, 77, 269, 235, 282, 186, 162, 230, 151, 44, 19, 290, 262, 8, 71, 280, 129, 247, 249, 295, 262, 15, 4, 193, 96, 252, 207, 47, 199, 146, 105, 289, 160, 16, 79, 167, 185, 89, 63, 150, 4, 293, 252, 98, 79, 214, 20, 115, 100, 278, 199, 108, 165, 46, 187, 7, 248, 23, 168, 150, 162, 256, 273, 141, 48, 3, 176, 193, 31, 278, 99, 35, 221, 128, 294, 292, 185, 252, 227, 202, 260, 133, 255, 138, 183, 75, 69, 72, 70, 178, 172, 164, 238, 280, 32, 88, 136, 107, 201, 84, 193, 174, 103, 27, 75, 285]);
assert.equal(count, 16);
});
it('29', () => {
const count = getLoveTrianglesCount([12, 87, 64, 12, 76, 125, 148, 45, 120, 35, 89, 53, 144, 121, 19, 18, 2, 100, 78, 88, 27, 44, 57, 106, 5, 41, 129, 36, 14, 55, 16, 137, 86, 85, 144, 141, 115, 113, 79, 17, 145, 9, 149, 77, 106, 135, 93, 143, 151, 140, 101, 82, 1, 109, 1, 119, 80, 54, 13, 114, 119, 70, 69, 15, 66, 24, 3, 25, 116, 20, 76, 79, 63, 151, 114, 27, 121, 47, 142, 94, 6, 69, 59, 113, 66, 4, 13, 92, 41, 23, 73, 20, 93, 111, 85, 142, 145, 32, 24, 78, 154, 147, 150, 91, 69, 73, 108, 92, 133, 13, 5, 21, 106, 106, 32, 135, 129, 64, 28, 42, 29, 120, 8, 81, 107, 94, 98, 84, 74, 97, 51, 0, 156, 72, 55, 10, 120, 18, 50, 60, 47, 72, 58, 110, 89, 98, 138, 89, 61, 8, 52, 126, 106, 146, 5, 109]);
assert.equal(count, 8);
});
it('30', () => {
const count = getLoveTrianglesCount([227, 204, 236, 176, 4, 192, 23, 152, 56, 179, 127, 114, 72, 15, 200, 139, 241, 188, 98, 90, 134, 119, 226, 157, 198, 118, 62, 192, 133, 48, 228, 180, 107, 88, 198, 16, 32, 150, 137, 170, 20, 171, 70, 106, 224, 2, 223, 173, 193, 220, 189, 103, 187, 172, 246, 254, 78, 77, 127, 63, 210, 199, 249, 214, 48, 257, 22, 74, 10, 98, 140, 243, 198, 112, 177, 137, 21, 222, 55, 147, 261, 49, 182, 44, 138, 177, 99, 177, 212, 41, 45, 247, 245, 164, 165, 145, 120, 159, 18, 101, 151, 255, 220, 222, 24, 84, 167, 63, 31, 252, 171, 68, 8, 116, 194, 12, 72, 140, 209, 197, 255, 166, 235, 145, 169, 115, 190, 194, 221, 96, 215, 195, 206, 186, 240, 132, 169, 196, 36, 26, 91, 253, 80, 251, 130, 105, 143, 6, 239, 259, 100, 113, 23, 129, 4, 152, 105, 83, 236, 61, 17, 235, 40, 191, 203, 181, 33, 121, 39, 205, 233, 235, 65, 237, 89, 155, 34, 159, 69, 37, 122, 158, 221, 92, 14, 21, 24, 99, 230, 59, 252, 148, 82, 126, 256, 219, 97, 231, 27, 14, 9, 249, 95, 46, 40, 29, 20, 212, 22, 160, 67, 175, 215, 244, 217, 23, 131, 81, 138, 52, 154, 57, 239, 91, 167, 216, 258, 109, 93, 51, 35, 135, 111, 162, 234, 178, 263, 144, 47, 232, 161, 214, 117, 64, 229, 79, 184, 188, 108, 66, 238, 164, 26, 9, 168, 132, 250, 1, 38, 129, 218, 240, 174]);
assert.equal(count, 68);
});
it('31', () => {
const count = getLoveTrianglesCount([139, 71, 352, 140, 237, 7, 16, 187, 217, 172, 227, 152, 50, 38, 195, 92, 232, 16, 198, 178, 323, 320, 227, 81, 227, 127, 143, 290, 356, 109, 259, 187, 348, 233, 83, 335, 165, 263, 301, 97, 357, 265, 205, 140, 24, 52, 327, 360, 358, 360, 294, 54, 345, 191, 105, 33, 231, 40, 145, 59, 212, 274, 79, 16, 144, 73, 158, 205, 356, 250, 25, 46, 66, 146, 103, 355, 334, 128, 136, 298, 45, 93, 323, 197, 34, 193, 203, 165, 259, 24, 86, 249, 313, 354, 343, 266, 58, 162, 279, 95, 17, 155, 305, 223, 285, 215, 41, 63, 88, 335, 253, 318, 363, 178, 271, 270, 145, 266, 249, 100, 33, 303, 106, 84, 113, 264, 23, 173, 71, 56, 298, 122, 226, 329, 214, 63, 148, 325, 9, 142, 190, 4, 295, 153, 60, 241, 47, 67, 183, 277, 215, 362, 65, 93, 61, 365, 41, 148, 115, 351, 191, 196, 100, 219, 109, 258, 347, 345, 198, 311, 76, 335, 78, 45, 308, 228, 39, 342, 289, 74, 238, 121, 296, 333, 276, 219, 258, 22, 317, 312, 52, 41, 2, 272, 231, 98, 124, 205, 187, 342, 175, 292, 225, 186, 169, 230, 69, 291, 56, 252, 251, 155, 224, 175, 351, 130, 139, 302, 204, 210, 344, 202, 259, 339, 268, 36, 71, 271, 150, 286, 15, 101, 368, 335, 65, 289, 261, 128, 163, 322, 354, 181, 221, 105, 43, 326, 167, 248, 101, 339, 44, 220, 140, 71, 351, 106, 292, 8, 104, 233, 5, 195, 289, 325, 290, 332, 4, 203, 41, 335, 176, 16, 62, 273, 51, 9, 229, 134, 369, 108, 309, 89, 139, 264, 244, 206, 338, 77, 38, 10, 200, 346, 44, 275, 319, 149, 345, 113, 259, 174, 177, 37, 132, 17, 75, 197, 324, 214, 328, 354, 365, 141, 154, 119, 113, 237, 330, 352, 143, 188, 333, 14, 35, 246, 126, 324, 18, 281, 278, 189, 206, 153, 2, 288, 226, 152, 189, 228, 70, 16, 310, 114, 55, 243, 166, 202, 247, 121, 124, 276, 106, 222, 2, 341, 171, 207, 107, 354, 56, 13, 130, 12, 315, 125, 170, 211, 175, 260, 99, 241]);
assert.equal(count, 65);
});
it('32', () => {
const count = getLoveTrianglesCount([6, 18, 38, 27, 36, 26, 32, 29, 3, 29, 8, 28, 36, 38, 29, 40, 10, 18, 14, 14, 39, 13, 23, 49, 4, 1, 25, 30, 17, 12, 32, 44, 10, 40, 39, 22, 5, 20, 48, 49, 45, 48, 49, 31, 47, 43, 12, 21, 34]);
assert.equal(count, 9);
});
it('33', () => {
const count = getLoveTrianglesCount([33, 59, 30, 34, 41, 49, 67, 39, 15, 41, 59, 43, 32, 43, 17, 55, 9, 39, 29, 24, 42, 33, 10, 28, 58, 64, 23, 20, 26, 62, 32, 48, 37, 64, 6, 64, 22, 16, 45, 46, 23, 16, 8, 44, 8, 63, 60, 31, 35, 11, 57, 32, 30, 49, 38, 7, 53, 10, 52, 37, 13, 53, 40, 29, 59, 0, 56]);
assert.equal(count, 12);
});
it('34', () => {
const count = getLoveTrianglesCount([73, 53, 56, 31, 117, 36, 28, 89, 106, 113, 46, 22, 30, 92, 91, 7, 26, 118, 61, 107, 94, 68, 5, 75, 72, 88, 109, 16, 38, 82, 96, 87, 52, 102, 60, 110, 79, 85, 59, 49, 55, 27, 54, 2, 25, 51, 108, 40, 48, 32, 11, 39, 119, 78, 83, 66, 74, 15, 64, 65, 114, 3, 120, 39, 35, 3, 14, 12, 104, 122, 111, 45, 21, 112, 90, 47, 8, 43, 93, 63, 71, 13, 41, 69, 29, 70, 50, 17, 77, 24, 58, 67, 37, 73, 10, 4, 68, 36, 18, 9, 98, 116, 93, 84, 72, 100, 121, 76, 42, 98, 81, 57, 95, 19, 92, 34, 23, 99, 2, 80, 20, 86]);
assert.equal(count, 37);
});
it('35', () => {
const count = getLoveTrianglesCount([107, 18, 277, 98, 315, 20, 355, 341, 262, 5, 67, 181, 162, 136, 121, 194, 329, 246, 166, 310, 113, 230, 78, 278, 218, 49, 134, 89, 207, 137, 129, 148, 292, 224, 255, 163, 196, 252, 241, 229, 129, 252, 167, 11, 309, 213, 277, 67, 293, 235, 296, 77, 231, 188, 28, 327, 175, 104, 33, 347, 71, 301, 290, 355, 45, 201, 44, 130, 307, 244, 209, 260, 32, 216, 294, 287, 142, 307, 116, 160, 240, 137, 116, 28, 351, 175, 34, 244, 84, 14, 116, 23, 6, 197, 46, 137, 133, 287, 304, 51, 220, 308, 354, 250, 104, 188, 169, 328, 232, 270, 182, 182, 76, 276, 161, 222, 336, 79, 38, 193, 192, 312, 189, 134, 126, 90, 345, 196, 328, 143, 220, 36, 168, 60, 142, 37, 50, 28, 134, 197, 322, 88, 7, 228, 212, 193, 66, 73, 91, 276, 191, 201, 320, 286, 144, 99, 321, 26, 46, 306, 269, 265, 17, 165, 60, 17, 228, 31, 1, 335, 208, 64, 238, 64, 71, 28, 219, 42, 291, 292, 311, 39, 272, 121, 79, 243, 108, 201, 248, 27, 74, 172, 193, 264, 332, 20, 144, 252, 164, 62, 97, 248, 158, 43, 297, 72, 279, 212, 333, 216, 151, 216, 65, 104, 270, 38, 209, 195, 191, 265, 74, 140, 248, 2, 311, 298, 58, 115, 335, 142, 237, 319, 290, 139, 261, 248, 90, 165, 108, 69, 7, 194, 59, 142, 236, 307, 259, 135, 321, 58, 203, 146, 268, 110, 191, 341, 306, 233, 50, 254, 256, 288, 156, 54, 192, 227, 51, 325, 151, 207, 105, 44, 328, 13, 343, 344, 339, 127, 49, 249, 145, 161, 189, 111, 258, 87, 252, 357, 231, 186, 221, 353, 335, 80, 187, 14, 69, 328, 240, 331, 110, 177, 153, 90, 201, 4, 248, 212, 40, 282, 231, 59, 132, 348, 196, 185, 65, 110, 261, 303, 198, 66, 209, 131, 252, 349, 232, 41, 83, 27, 232, 141, 217, 285, 253, 2, 219, 118, 47, 63, 76, 29, 334, 109, 289, 84, 94, 53, 86, 132, 163, 125, 32, 259, 172, 260, 273, 19]);
assert.equal(count, 11);
});
it('36', () => {
const count = getLoveTrianglesCount([42, 30, 134, 65, 162, 127, 62, 136, 61, 185, 235, 196, 181, 155, 204, 55, 244, 14, 46, 225, 104, 146, 157, 284, 76, 216, 248, 17, 266, 114, 140, 26, 124, 113, 177, 309, 41, 115, 254, 163, 312, 195, 68, 151, 152, 129, 194, 67, 171, 102, 83, 203, 212, 13, 91, 313, 51, 184, 250, 174, 75, 182, 115, 273, 111, 147, 220, 319, 92, 222, 175, 189, 22, 121, 9, 264, 29, 98, 201, 36, 79, 238, 57, 58, 11, 241, 320, 170, 24, 103, 16, 255, 310, 74, 64, 70, 221, 274, 107, 47, 97, 137, 145, 106, 125, 21, 128, 239, 249, 71, 4, 200, 160, 2, 308, 305, 259, 52, 6, 298, 94, 199, 227, 232, 297, 256, 119, 99, 19, 289, 161, 31, 108, 208, 40, 209, 50, 252, 229, 132, 279, 296, 165, 304, 90, 73, 218, 272, 179, 116, 198, 294, 302, 141, 18, 231, 288, 115, 270, 34, 267, 245, 135, 269, 240, 300, 299, 156, 142, 295, 315, 318, 247, 206, 110, 187, 223, 93, 242, 246, 54, 7, 12, 84, 285, 207, 280, 164, 228, 211, 180, 126, 39, 100, 1, 183, 82, 44, 213, 272, 81, 139, 118, 251, 109, 60, 287, 3, 8, 159, 306, 292, 122, 86, 166, 32, 87, 66, 123, 48, 101, 96, 35, 173, 277, 275, 219, 72, 202, 258, 168, 33, 59, 117, 85, 47, 138, 197, 133, 143, 214, 149, 144, 28, 5, 191, 224, 282, 205, 233, 15, 237, 276, 193, 69, 192, 130, 307, 234, 56, 153, 120, 290, 25, 194, 77, 131, 6, 188, 210, 226, 112, 95, 78, 271, 317, 20, 316, 154, 176, 130, 27, 278, 89, 10, 172, 186, 23, 257, 291, 263, 53, 311, 45, 88, 169, 105, 262, 301, 215, 167, 261, 80, 243, 150, 190, 230, 38, 80, 178, 314, 37, 260, 293, 49, 283, 253, 286, 43, 217]);
assert.equal(count, 104);
});
it('37', () => {
const count = getLoveTrianglesCount([55, 68, 47, 37, 26, 3, 14, 70, 59, 26, 44, 5, 57, 25, 28, 40, 44, 46, 60, 20, 11, 48, 1, 36, 52, 48, 6, 29, 72, 8, 15, 16, 41, 19, 19, 52, 50, 13, 33, 32, 39, 67, 0, 46, 30, 17, 6, 68, 71, 0, 9, 24, 57, 50, 27, 61, 15, 23, 51, 35, 62, 56, 32, 62, 24, 48, 46, 66, 63, 11, 70, 28]);
assert.equal(count, 10);
});
it('38', () => {
const count = getLoveTrianglesCount([43, 94, 76, 196, 235, 122, 275, 49, 39, 240, 246, 257, 209, 89, 194, 47, 7, 35, 37, 175, 193, 64, 210, 111, 160, 197, 104, 153, 33, 112, 36, 158, 220, 59, 88, 105, 184, 211, 92, 187, 266, 192, 69, 180, 145, 256, 143, 172, 226, 272, 181, 209, 23, 136, 120, 270, 238, 123, 229, 267, 86, 3, 80, 140, 67, 224, 99, 66, 1, 6, 245, 110, 75, 40, 91, 62, 237, 268, 37, 255, 124, 85, 142, 44, 170, 247, 14, 18, 87, 154, 73, 165, 48, 199, 83, 125, 141, 262, 65, 150, 169, 157, 78, 218, 215, 20, 144, 227, 49, 164, 219, 274, 195, 97, 23, 32, 38, 249, 90, 214, 269, 70, 128, 204, 130, 207, 216, 58, 60, 96, 167, 127, 242, 50, 146, 208, 20, 135, 52, 22, 114, 95, 16, 243, 246, 138, 201, 176, 200, 206, 265, 219, 276, 119, 133, 223, 171, 116, 71, 213, 236, 131, 46, 72, 39, 186, 162, 126, 233, 82, 102, 93, 38, 57, 106, 225, 250, 15, 5, 84, 203, 98, 121, 79, 149, 260, 74, 10, 202, 71, 26, 253, 232, 178, 217, 273, 191, 56, 2, 185, 244, 234, 51, 81, 77, 100, 168, 54, 139, 53, 173, 109, 25, 55, 36, 132, 113, 27, 24, 29, 97, 151, 248, 68, 148, 8, 241, 259, 34, 177, 161, 21, 101, 189, 179, 231, 205, 174, 12, 188, 108, 155, 107, 147, 159, 45, 61, 156, 264, 230, 160, 201, 42, 41, 63, 163, 239, 78, 261, 166, 228, 182, 209, 118, 222, 254, 129, 258, 183, 198, 249, 134, 4, 30, 17, 28]);
assert.equal(count, 86);
});
it('39', () => {
const count = getLoveTrianglesCount([133, 39, 57, 3, 54, 58, 51, 92, 43, 117, 97, 53, 125, 92, 7, 37, 29, 99, 98, 105, 112, 64, 13, 93, 62, 125, 88, 60, 42, 117, 102, 108, 65, 112, 117, 22, 128, 19, 4, 134, 117, 17, 31, 20, 49, 119, 88, 124, 135, 134, 138, 59, 69, 99, 122, 61, 74, 93, 18, 86, 57, 112, 121, 98, 20, 132, 103, 47, 12, 99, 91, 133, 20, 63, 106, 113, 19, 80, 125, 79, 124, 47, 107, 1, 136, 28, 93, 130, 35, 103, 30, 88, 6, 120, 18, 127, 81, 112, 59, 8, 85, 14, 75, 34, 120, 1, 39, 44, 136, 106, 53, 78, 57, 27, 100, 11, 89, 9, 94, 129, 109, 66, 4, 105, 23, 26, 106, 88, 72, 92, 109, 122, 84, 6, 38, 131, 110, 7]);
assert.equal(count, 12);
});
it('40', () => {
const count = getLoveTrianglesCount([51, 69, 95, 205, 235, 27, 197, 89, 95, 157, 64, 202, 106, 260, 57, 250, 22, 81, 260, 178, 49, 227, 99, 12, 171, 47, 192, 34, 125, 65, 217, 116, 84, 245, 77, 154, 193, 207, 38, 262, 176, 47, 204, 76, 48, 272, 242, 231, 169, 237, 261, 144, 220, 266, 91, 103, 23, 79, 217, 117, 254, 194, 43, 199, 90, 221, 166, 53, 134, 190, 150, 258, 242, 103, 187, 36, 106, 56, 261, 23, 49, 159, 236, 105, 156, 276, 241, 16, 180, 30, 201, 270, 108, 228, 229, 233, 239, 252, 80, 178, 65, 15, 78, 103, 195, 35, 60, 255, 125, 121, 125, 208, 275, 193, 135, 37, 67, 116, 74, 109, 230, 53, 191, 148, 222, 188, 61, 228, 145, 248, 193, 266, 278, 2, 122, 54, 166, 143, 4, 6, 159, 162, 244, 152, 190, 142, 239, 243, 40, 224, 85, 52, 131, 76, 213, 151, 59, 219, 193, 123, 268, 146, 165, 185, 77, 117, 97, 266, 81, 8, 241, 212, 55, 162, 217, 75, 254, 69, 134, 8, 235, 96, 149, 2, 11, 49, 268, 47, 11, 129, 160, 6, 141, 184, 84, 197, 257, 31, 11, 50, 55, 271, 150, 63, 139, 219, 39, 204, 211, 38, 27, 48, 246, 238, 231, 84, 232, 73, 275, 26, 230, 29, 37, 203, 94, 177, 17, 225, 3, 66, 45, 59, 182, 73, 168, 276, 200, 96, 251, 185, 243, 218, 171, 138, 28, 155, 53, 92, 228, 88, 147, 191, 104, 226, 93, 264, 7, 62, 109, 279, 58, 273, 177, 225, 31, 235, 150, 28, 160, 272, 12, 92, 173, 7, 206, 83, 66, 73, 19]);
assert.equal(count, 49);
});
it('41', () => {
const count = getLoveTrianglesCount([107, 130, 46, 18, 141, 141, 42, 41, 5, 145, 93, 17, 8, 15, 48, 4, 112, 82, 71, 85, 111, 101, 119, 33, 105, 141, 12, 119, 109, 41, 148, 126, 64, 64, 50, 102, 136, 79, 146, 11, 94, 22, 102, 21, 86, 72, 130, 143, 139, 75, 112, 107, 39, 67, 100, 20, 125, 73, 122, 19, 46, 16, 148, 73, 17, 80, 31, 133, 110, 103, 148, 82, 33, 82, 140, 145, 125, 26, 59, 58, 31, 95, 136, 84, 1, 137, 46, 89, 65, 83, 1, 60, 77, 144, 74, 6, 14, 58, 124, 126, 128, 114, 60, 38, 147, 84, 28, 3, 42, 45, 17, 129, 60, 130, 106, 90, 6, 39, 22, 28, 117, 110, 111, 119, 138, 79, 28, 134, 51, 132, 88, 2, 5, 101, 10, 140, 21, 97, 29, 83, 51, 60, 114, 41, 135, 118, 25, 24]);
assert.equal(count, 10);
});
it('42', () => {
const count = getLoveTrianglesCount([9, 164, 280, 279, 209, 172, 53, 244, 54, 126, 119, 111, 40, 100, 236, 134, 186, 249, 100, 251, 229, 218, 19, 275, 233, 275, 240, 2, 246, 280, 228, 127, 185, 128, 106, 177, 190, 241, 152, 162, 281, 196, 140, 34, 143, 150, 33, 7, 216, 110, 23, 288, 48, 1, 181, 77, 84, 262, 84, 267, 285, 1, 178, 216, 162, 24, 157, 43, 213, 155, 165, 83, 192, 15, 256, 280, 41, 181, 14, 106, 159, 9, 201, 258, 72, 227, 272, 209, 254, 255, 271, 205, 241, 185, 243, 4, 32, 222, 89, 23, 213, 53, 84, 56, 61, 146, 143, 274, 276, 196, 105, 185, 8, 78, 60, 132, 51, 15, 212, 91, 142, 75, 85, 6, 149, 199, 216, 44, 280, 40, 45, 290, 94, 263, 130, 33, 99, 200, 233, 68, 66, 164, 131, 67, 262, 152, 46, 276, 199, 147, 101, 224, 196, 202, 214, 161, 144, 4, 5, 100, 241, 220, 227, 121, 283, 169, 167, 287, 202, 50, 22, 93, 39, 42, 132, 88, 221, 58, 54, 78, 210, 217, 17, 58, 136, 183, 223, 115, 289, 21, 168, 27, 39, 87, 41, 174, 169, 71, 71, 173, 72, 10, 95, 245, 187, 26, 284, 207, 159, 78, 221, 268, 151, 70, 231, 32, 129, 255, 52, 40, 36, 248, 100, 39, 285, 89, 22, 270, 190, 275, 131, 191, 21, 132, 18, 74, 77, 252, 27, 192, 172, 227, 212, 113, 127, 61, 15, 282, 235, 211, 184, 14, 161, 226, 22, 122, 128, 103, 22, 284, 201, 234, 16, 193, 194, 204, 115, 119, 156, 228, 120, 194, 160, 49, 41, 142, 159, 160, 158, 217, 77, 222, 71, 88, 246, 6, 191, 186, 104, 116]);
assert.equal(count, 44);
});
it('43', () => {
const count = getLoveTrianglesCount([64, 326, 220, 289, 219, 121, 131, 223, 313, 327, 209, 28, 273, 296, 202, 291, 203, 128, 21, 366, 230, 195, 107, 208, 196, 336, 313, 73, 77, 266, 336, 7, 353, 237, 204, 130, 167, 221, 360, 276, 316, 53, 347, 313, 263, 117, 357, 29, 250, 44, 55, 91, 299, 324, 72, 9, 179, 133, 362, 155, 205, 148, 348, 208, 272, 147, 115, 104, 299, 63, 361, 46, 47, 14, 271, 93, 249, 239, 51, 298, 223, 212, 283, 105, 38, 323, 66, 232, 133, 114, 359, 247, 41, 82, 143, 162, 346, 258, 124, 217, 307, 120, 298, 362, 192, 266, 183, 115, 309, 20, 220, 353, 277, 214, 0, 36, 72, 181, 359, 260, 368, 285, 173, 188, 214, 260, 107, 112, 141, 217, 32, 26, 161, 52, 17, 115, 126, 123, 338, 342, 234, 109, 126, 100, 30, 190, 87, 78, 133, 59, 56, 207, 261, 249, 365, 184, 52, 8, 99, 14, 58, 256, 352, 217, 141, 232, 155, 204, 200, 89, 206, 103, 138, 82, 165, 330, 216, 193, 101, 35, 355, 322, 258, 88, 153, 90, 327, 297, 54, 94, 349, 310, 318, 305, 124, 40, 215, 290, 292, 90, 16, 136, 365, 249, 272, 352, 95, 1, 87, 66, 126, 94, 130, 301, 253, 291, 213, 303, 289, 247, 241, 122, 158, 12, 86, 272, 311, 243, 163, 19, 106, 184, 214, 165, 306, 163, 284, 69, 349, 185, 337, 43, 103, 187, 193, 330, 18, 345, 306, 168, 328, 200, 197, 197, 294, 267, 144, 259, 183, 83, 185, 288, 120, 303, 233, 145, 330, 89, 315, 354, 360, 61, 47, 350, 346, 196, 79, 252, 274, 24, 310, 317, 260, 34, 303, 342, 82, 300, 5, 336, 201, 288, 30, 307, 81, 160, 124, 345, 331, 262, 125, 287, 2, 252, 340, 154, 255, 96, 142, 105, 325, 115, 328, 140, 145, 93, 60, 178, 49, 9, 135, 268, 225, 1, 227, 303, 244, 28, 290, 344, 53, 220, 129, 95, 83, 331, 357, 145, 173, 194, 286, 341, 107, 176, 103, 125, 252, 203, 78, 279, 113, 236, 128, 337, 118, 8, 273, 16, 52, 75, 56, 68, 235, 39, 167, 110, 191, 6]);
assert.equal(count, 53);
});
it('44', () => {
const count = getLoveTrianglesCount([37, 67, 29, 31, 77, 73, 76, 70, 51, 7, 48, 14, 21, 55, 22, 4, 65, 27, 81, 25, 80, 66, 72, 26, 11, 36, 75, 9, 8, 53, 16, 32, 79, 55, 19, 24, 74, 17, 5, 9, 68, 25, 49, 70, 20, 69, 70, 25, 72, 67, 28, 45, 31, 5, 12, 47, 63, 6, 5, 55, 2, 71, 41, 30, 38, 15, 61, 63, 16, 56, 40, 78, 58, 1, 50, 10, 59, 23, 5, 13, 35]);
assert.equal(count, 17);
});
it('45', () => {
const count = getLoveTrianglesCount([2, 1, 3]);
assert.equal(count, 0);
});
it('46', () => {
const count = getLoveTrianglesCount([123, 267, 151, 247, 18, 37, 199, 16, 145, 8, 260, 123, 17, 145, 3, 10, 67, 126, 77, 57, 43, 217, 173, 73, 173, 71, 250, 140, 154, 165, 240, 133, 123, 13, 232, 167, 275, 253, 287, 201, 36, 46, 27, 16, 122, 97, 232, 73, 215, 51, 1, 266, 210, 181, 96, 264, 196, 144, 117, 220, 123, 185, 65, 94, 108, 150, 178, 210, 21, 142, 230, 234, 96, 276, 18, 19, 21, 146, 242, 180, 78, 11, 292, 238, 226, 84, 260, 282, 65, 71, 220, 202, 169, 121, 282, 80, 257, 255, 8, 12, 85, 108, 117, 190, 117, 109, 253, 132, 141, 180, 184, 77, 88, 275, 232, 70, 195, 172, 179, 109, 64, 49, 149, 37, 177, 159, 259, 208, 176, 31, 2, 65, 201, 188, 108, 289, 287, 232, 147, 220, 192, 50, 126, 39, 3, 81, 46, 154, 50, 5, 15, 140, 20, 288, 148, 28, 55, 253, 62, 133, 116, 210, 221, 208, 158, 151, 114, 136, 134, 199, 53, 250, 178, 132, 265, 277, 32, 23, 187, 96, 82, 183, 13, 276, 188, 294, 222, 169, 123, 262, 48, 85, 136, 267, 59, 37, 106, 107, 285, 211, 32, 219, 178, 235, 88, 100, 146, 57, 259, 129, 127, 112, 206, 145, 122, 29, 51, 189, 92, 236, 207, 72, 143, 52, 78, 192, 101, 55, 227, 90, 274, 81, 282, 109, 119, 209, 110, 55, 207, 19, 292, 32, 156, 281, 275, 111, 13, 223, 261, 104, 55, 288, 166, 238, 13, 170, 3, 139, 211, 162, 266, 85, 288, 167, 216, 268, 281, 52, 135, 193, 90, 7, 122, 88, 196, 267, 227, 241, 276, 104, 277, 182, 254, 250, 220, 80, 96, 148, 38, 138, 78, 1, 154, 290]);
assert.equal(count, 18);
});
it('47', () => {
const count = getLoveTrianglesCount([1, 67, 40, 42, 18, 44, 30, 62, 28, 31, 6, 66, 60, 29, 34, 24, 15, 19, 5, 19, 48, 21, 13, 25, 16, 65, 55, 46, 59, 32, 42, 7, 69, 17, 41, 45, 8, 40, 67, 68, 70, 10, 63, 11, 61, 9, 24, 22, 2, 23, 66, 46, 43, 12, 57, 51, 27, 33, 14, 23, 36, 37, 53, 41, 40, 54, 49, 3, 58, 64, 70, 61, 68]);
assert.equal(count, 19);
});
it('48', () => {
const count = getLoveTrianglesCount([74, 41, 63, 50, 49, 58, 52, 19, 11, 92, 28, 56, 75, 69, 45, 83, 25, 8, 18, 22, 34, 38, 90, 33, 29, 3, 43, 9, 17, 1, 79, 91, 77, 51, 54, 3, 6, 20, 66, 42, 46, 57, 71, 75, 50, 62, 43, 7, 73, 15, 21, 48, 84, 92, 23, 64, 40, 37, 85, 88, 60, 41, 36, 12, 32, 95, 56, 16, 96, 80, 27, 44, 5, 30, 72, 81, 24, 86, 53, 17, 89, 94, 87, 79, 74, 97, 16, 61, 76, 55, 65, 35, 82, 93, 39, 14, 78]);
assert.equal(count, 28);
});
it('49', () => {
const count = getLoveTrianglesCount([44, 102, 103, 107, 23, 74, 49, 88, 54, 32, 50, 14, 36, 98, 29, 49, 87, 34, 111, 14, 88, 54, 2, 100, 10, 9, 8, 85, 63, 16, 18, 69, 2, 35, 3, 84, 63, 79, 11, 13, 52, 10, 50, 37, 33, 109, 54, 68, 40, 48, 65, 22, 97, 26, 95, 32, 50, 80, 83, 13, 78, 105, 71, 77, 80, 108, 62, 36, 11, 17, 77, 38, 93, 110, 3, 78, 97, 46, 50, 93, 64, 97, 28, 46, 4, 57, 6, 53, 84, 31, 92, 9, 100, 57, 69, 68, 55, 83, 64, 73, 36, 0, 40, 58, 22, 59, 20, 2, 78, 69, 106]);
assert.equal(count, 3);
});
it('50', () => {
const count = getLoveTrianglesCount([9, 3, 7, 5, 3, 1, 2, 1, 8]);
assert.equal(count, 2);
});
it('51', () => {
const count = getLoveTrianglesCount([0, 18, 26, 2, 4, 2, 11, 4, 3, 13, 25, 24, 17, 4, 24, 3, 23, 4, 11, 7, 15, 7, 22, 9, 24, 16]);
assert.equal(count, 2);
});
it('52', () => {
const count = getLoveTrianglesCount([242, 308, 115, 348, 336, 241, 258, 179, 121, 324, 186, 322, 89, 98, 197, 138, 214, 222, 110, 320, 336, 161, 30, 139, 342, 119, 242, 280, 246, 287, 240, 244, 119, 146, 233, 105, 59, 85, 183, 101, 28, 299, 254, 95, 171, 203, 238, 165, 145, 93, 244, 68, 142, 16, 248, 344, 354, 121, 224, 241, 209, 243, 140, 157, 23, 319, 264, 167, 162, 55, 97, 207, 323, 90, 318, 286, 180, 195, 205, 224, 95, 316, 134, 39, 12, 68, 284, 114, 47, 209, 273, 273, 157, 53, 230, 238, 291, 277, 9, 351, 98, 204, 47, 300, 341, 127, 283, 218, 284, 281, 176, 98, 51, 195, 25, 194, 146, 56, 4, 210, 249, 357, 300, 138, 227, 104, 182, 325, 226, 278, 356, 162, 83, 217, 344, 32, 272, 319, 67, 152, 334, 299, 186, 214, 358, 247, 258, 315, 30, 103, 306, 35, 307, 5, 183, 118, 206, 169, 46, 204, 244, 251, 201, 189, 196, 359, 361, 289, 196, 175, 262, 154, 152, 45, 81, 306, 113, 224, 228, 144, 359, 10, 338, 176, 227, 323, 27, 326, 83, 100, 317, 223, 165, 211, 217, 160, 130, 108, 44, 327, 219, 99, 170, 61, 83, 168, 17, 275, 12, 33, 321, 162, 326, 238, 167, 214, 83, 239, 314, 29, 215, 265, 323, 134, 340, 128, 36, 335, 163, 119, 249, 347, 23, 277, 231, 84, 213, 293, 108, 185, 169, 73, 31, 253, 200, 154, 227, 360, 66, 7, 304, 73, 138, 99, 160, 128, 275, 109, 275, 358, 122, 225, 258, 202, 183, 170, 139, 55, 63, 15, 126, 315, 319, 20, 319, 338, 104, 68, 117, 235, 214, 334, 258, 315, 322, 322, 339, 279, 30, 157, 21, 224, 143, 70, 353, 108, 61, 338, 111, 74, 81, 320, 232, 332, 78, 111, 128, 124, 314, 136, 65, 61, 153, 57, 19, 83, 14, 228, 259, 220, 217, 209, 301, 78, 44, 168, 150, 16, 332, 131, 299, 160, 131, 113, 260, 154, 59, 351, 251, 96, 329, 95, 273, 194, 231, 55, 61, 354, 208, 336, 255, 49, 208, 4, 179, 250, 261, 234, 68, 143, 68]);
assert.equal(count, 9);
});
it('53', () => {
const count = getLoveTrianglesCount([188, 33, 14, 107, 189, 17, 49, 121, 16, 11, 159, 3, 151, 12, 113, 112, 78, 192, 209, 67, 123, 65, 42, 103, 47, 128, 161, 143, 168, 69, 91, 198, 181, 87, 215, 104, 210, 81, 102, 172, 194, 44, 95, 23, 196, 204, 208, 99, 157, 53, 56, 15, 146, 211, 117, 187, 201, 55, 185, 1, 35, 20, 179, 71, 184, 119, 62, 4, 125, 31, 72, 64, 200, 152, 24, 8, 116, 6, 163, 212, 188, 13, 74, 28, 40, 177, 131, 142, 66, 63, 70, 165, 37, 71, 114, 48, 156, 132, 96, 212, 26, 206, 75, 130, 108, 141, 68, 110, 186, 105, 166, 9, 52, 43, 136, 118, 58, 77, 89, 139, 76, 19, 199, 171, 30, 56, 46, 101, 18, 36, 34, 169, 155, 88, 73, 164, 180, 144, 182, 32, 190, 174, 84, 145, 138, 50, 137, 57, 213, 27, 82, 83, 218, 183, 203, 167, 7, 149, 10, 124, 150, 149, 216, 115, 178, 193, 97, 214, 98, 41, 160, 85, 205, 88, 109, 86, 176, 92, 90, 147, 2, 120, 221, 22, 195, 175, 51, 38, 220, 106, 173, 129, 111, 170, 59, 207, 40, 140, 21, 135, 148, 54, 133, 127, 191, 39, 45, 25, 122, 93, 202, 219, 162, 29, 61, 79, 153, 217, 80, 5, 154]);
assert.equal(count, 71);
});
it('54', () => {
const count = getLoveTrianglesCount([44, 89, 8, 17, 117, 183, 50, 163, 187, 158, 120, 67, 163, 48, 176, 110, 171, 10, 120, 77, 62, 53, 140, 20, 133, 96, 144, 5, 168, 160, 147, 57, 76, 88, 124, 123, 120, 83, 139, 41, 148, 62, 151, 172, 183, 153, 58, 52, 141, 123, 179, 54, 111, 87, 148, 47, 158, 56, 159, 166, 16, 96, 5, 109, 98, 32, 186, 40, 14, 170, 150, 58, 96, 4, 103, 122, 178, 15, 11, 189, 118, 70, 147, 2, 41, 78, 52, 133, 166, 81, 1, 83, 189, 15, 129, 42, 25, 176, 52, 66, 70, 141, 46, 139, 6, 93, 4, 184, 82, 61, 165, 6, 29, 86, 129, 154, 114, 165, 23, 118, 174, 136, 7, 138, 64, 44, 72, 97, 61, 166, 120, 139, 139, 125, 58, 76, 174, 35, 25, 154, 184, 22, 39, 105, 56, 125, 38, 40, 158, 173, 163, 165, 113, 23, 157, 77, 146, 18, 17, 186, 118, 129, 3, 16, 169, 9, 71, 113, 152, 115, 159, 126, 100, 157, 82, 78, 134, 134, 54, 80, 18, 17, 91, 49, 138, 12, 166, 152, 106, 109]);
assert.equal(count, 22);
});
it('55', () => {
const count = getLoveTrianglesCount([24, 28, 4, 16, 11, 20, 25, 26, 29, 13, 15, 31, 27, 24, 8, 15, 32, 12, 27, 24, 22, 24, 8, 11, 12, 17, 9, 6, 11, 21, 5, 2]);
assert.equal(count, 0);
});
it('56', () => {
const count = getLoveTrianglesCount([37, 59, 137, 118, 184, 132, 13, 309, 294, 288, 108, 257, 263, 345, 146, 132, 151, 320, 226, 267, 183, 229, 205, 366, 107, 135, 16, 146, 237, 71, 154, 274, 113, 178, 73, 236, 206, 61, 202, 211, 203, 46, 82, 339, 33, 364, 330, 37, 245, 376, 197, 64, 231, 364, 266, 310, 208, 289, 73, 213, 343, 300, 342, 351, 228, 271, 95, 176, 101, 42, 376, 380, 2, 162, 27, 79, 217, 356, 299, 248, 273, 43, 51, 298, 76, 89, 339, 345, 5, 133, 330, 123, 48, 131, 376, 33, 115, 109, 315, 323, 54, 76, 316, 236, 7, 372, 204, 193, 90, 304, 326, 220, 284, 375, 345, 276, 299, 344, 139, 316, 74, 233, 206, 201, 69, 361, 287, 124, 8, 375, 222, 27, 284, 343, 147, 361, 354, 360, 328, 12, 44, 360, 64, 276, 298, 174, 26, 50, 303, 23, 342, 145, 353, 295, 60, 367, 371, 170, 370, 110, 163, 362, 47, 105, 252, 153, 354, 124, 213, 362, 53, 117, 249, 15, 93, 41, 124, 10, 183, 198, 32, 191, 338, 296, 138, 51, 272, 377, 21, 349, 55, 101, 11, 275, 86, 237, 186, 373, 58, 46, 177, 260, 176, 25, 150, 92, 270, 108, 132, 274, 269, 322, 155, 153, 108, 248, 278, 340, 30, 184, 121, 94, 271, 373, 222, 237, 269, 276, 338, 147, 171, 235, 282, 257, 261, 172, 137, 99, 91, 40, 233, 220, 313, 334, 268, 8, 64, 285, 119, 70, 184, 26, 117, 212, 27, 352, 140, 224, 120, 38, 88, 96, 7, 347, 244, 191, 272, 49, 320, 168, 183, 20, 55, 181, 309, 347, 75, 77, 235, 94, 352, 122, 118, 294, 216, 246, 83, 178, 357, 100, 21, 54, 154, 306, 293, 251, 100, 152, 76, 318, 94, 326, 335, 35, 176, 284, 2, 261, 246, 197, 170, 222, 342, 245, 46, 23, 264, 236, 151, 211, 86, 254, 330, 37, 19, 195, 181, 54, 325, 37, 317, 151, 243, 265, 377, 49, 61, 22, 183, 61, 265, 17, 337, 4, 89, 224, 116, 92, 53, 233, 247, 40, 214, 3, 36, 266, 58, 170, 272, 63, 177, 158, 101, 292, 236, 102, 373, 151, 296, 18, 61, 365, 258, 118, 73, 30, 303, 332, 119, 126]);
assert.equal(count, 47);
});
it('57', () => {
const count = getLoveTrianglesCount([23, 12, 8, 12, 6, 21, 3, 19, 7, 0, 14, 0, 11, 13, 21, 13, 7, 11, 19, 13, 7, 19, 17, 5]);
assert.equal(count, 1);
});
it('58', () => {
const count = getLoveTrianglesCount([264, 15, 87, 112, 67, 125, 160, 218, 92, 275, 273, 78, 61, 306, 245, 162, 184, 104, 33, 4, 46, 162, 214, 40, 165, 95, 125, 25, 10, 23, 1, 268, 246, 116, 215, 241, 300, 267, 287, 86, 272, 70, 157, 267, 49, 308, 295, 98, 113, 94, 166, 64, 189, 242, 199, 203, 54, 78, 63, 274, 180, 111, 156, 305, 157, 285, 179, 85, 304, 164, 17, 188, 229, 84, 169, 218, 223, 130, 26, 214, 140, 259, 228, 137, 282, 24, 186, 144, 186, 126, 257, 270, 304, 292, 79, 105, 18, 163, 199, 55, 55, 35, 49, 97, 196, 245, 121, 146, 82, 204, 69, 20, 103, 200, 288, 157, 216, 194, 185, 249, 136, 133, 193, 197, 206, 207, 217, 118, 178, 12, 299, 201, 262, 41, 87, 107, 74, 17, 153, 141, 81, 222, 215, 110, 142, 212, 80, 210, 13, 252, 91, 208, 172, 22, 164, 297, 209, 126, 182, 220, 35, 153, 48, 235, 28, 25, 60, 156, 249, 93, 177, 162, 46, 40, 207, 216, 265, 237, 5, 13, 176, 191, 60, 138, 251, 3, 252, 241, 230, 76, 159, 302, 230, 68, 187, 96, 291, 109, 309, 247, 283, 83, 303, 144, 271, 27, 158, 199, 65, 269, 86, 233, 276, 279, 52, 181, 122, 190, 46, 7, 46, 185, 67, 203, 27, 241, 44, 202, 255, 123, 124, 236, 146, 70, 70, 177, 129, 241, 264, 296, 72, 57, 260, 46, 2, 19, 114, 296, 75, 192, 119, 195, 230, 305, 73, 179, 151, 184, 109, 39, 132, 122, 281, 307, 171, 201, 227, 149, 148, 9, 102, 134, 284, 183, 29, 207, 308, 114, 80, 245, 285, 288, 266, 11, 263, 277, 260, 85, 285, 131, 306, 50, 248, 166, 248, 293, 168, 73, 290, 271, 5, 250, 224, 111, 52, 197, 239, 21, 208]);
assert.equal(count, 67);
});
it('59', () => {
const count = getLoveTrianglesCount([]);
assert.equal(count, 0);
});
it('60', () => {
const count = getLoveTrianglesCount([179, 62, 27, 108, 43, 1, 52, 34, 83, 22, 189, 229, 8, 99, 24, 72, 200, 155, 151, 178, 146, 49, 234, 185, 80, 211, 117, 113, 102, 91, 73, 126, 128, 13, 177, 173, 27, 53, 31, 111, 91, 157, 223, 70, 232, 214, 114, 165, 10, 209, 118, 67, 131, 94, 68, 41, 19, 225, 208, 40, 228, 71, 219, 130, 187, 165, 153, 202, 174, 116, 2, 96, 39, 227, 124, 182, 18, 110, 194, 109, 219, 166, 107, 46, 28, 106, 79, 215, 51, 192, 56, 125, 101, 132, 181, 147, 64, 81, 186, 127, 159, 204, 207, 237, 88, 149, 9, 59, 141, 145, 206, 146, 85, 188, 135, 44, 3, 89, 76, 222, 235, 112, 103, 221, 150, 163, 133, 143, 161, 97, 38, 54, 100, 47, 216, 67, 140, 190, 121, 198, 233, 23, 33, 64, 172, 122, 72, 173, 86, 92, 57, 129, 136, 220, 77, 50, 168, 148, 93, 170, 152, 95, 32, 26, 231, 201, 224, 42, 45, 212, 221, 110, 158, 180, 184, 90, 226, 11, 6, 213, 162, 119, 150, 197, 15, 14, 157, 47, 178, 193, 62, 176, 138, 87, 136, 17, 175, 137, 205, 196, 82, 55, 171, 29, 210, 40, 123, 108, 156, 199, 164, 160, 174, 84, 105, 115, 237, 118, 98, 152, 75, 228, 5, 229, 230, 35, 104, 120, 167, 58, 48, 169, 109, 142, 139, 90, 227]);
assert.equal(count, 68);
});
it('61', () => {
const count = getLoveTrianglesCount([145, 149, 296, 119, 183, 44, 108, 47, 17, 220, 186, 95, 138, 286, 41, 305, 38, 39, 23, 277, 330, 231, 91, 177, 4, 166, 317, 111, 14, 87, 197, 310, 234, 8, 179, 175, 51, 9, 209, 210, 285, 275, 271, 232, 71, 27, 34, 148, 190, 105, 99, 260, 149, 75, 169, 216, 140, 331, 235, 20, 168, 280, 316, 77, 7, 48, 189, 44, 47, 301, 180, 32, 283, 53, 79, 270, 167, 324, 54, 50, 84, 309, 78, 21, 287, 155, 174, 19, 35, 10, 19, 132, 245, 122, 264, 187, 245, 214, 37, 124, 267, 24, 298, 13, 80, 117, 54, 65, 101, 133, 186, 221, 127, 314, 313, 2, 262, 67, 25, 321, 288, 272, 311, 227, 255, 319, 147, 23, 150, 247, 170, 185, 274, 277, 111, 275, 208, 104, 23, 144, 24, 192, 120, 242, 194, 299, 113, 66, 74, 239, 219, 49, 56, 58, 302, 55, 84, 120, 203, 96, 127, 116, 201, 303, 14, 289, 64, 188, 156, 261, 16, 151, 31, 30, 328, 178, 102, 82, 89, 45, 13, 123, 266, 87, 92, 28, 160, 61, 118, 152, 70, 273, 250, 1, 325, 33, 173, 207, 304, 308, 265, 312, 268, 233, 221, 40, 202, 269, 18, 206, 103, 308, 97, 329, 249, 153, 43, 283, 172, 90, 259, 146, 134, 30, 239, 166, 100, 215, 189, 85, 115, 6, 274, 196, 130, 95, 256, 318, 129, 245, 72, 307, 177, 246, 213, 290, 235, 199, 228, 279, 63, 42, 121, 217, 294, 308, 76, 73, 205, 174, 131, 106, 62, 12, 163, 5, 109, 159, 137, 257, 217, 94, 142, 110, 252, 80, 60, 238, 86, 263, 1, 250, 258, 114, 15, 165, 230, 253, 26, 244, 192, 21, 131, 125, 164, 323, 223, 211, 222, 195, 191, 86, 326, 248, 171, 243, 144, 237, 178, 72, 182, 207, 231, 284, 141, 251, 46, 278, 116, 321, 158, 233, 3, 83, 300, 164, 180, 36, 98, 84, 154]);
assert.equal(count, 89);
});
it('62', () => {
const count = getLoveTrianglesCount([51, 99, 18, 27, 4, 98, 14, 99, 99, 66, 56, 28, 18, 76, 58, 89, 51, 46, 19, 12, 58, 7, 64, 61, 28, 15, 85, 27, 76, 67, 31, 69, 49, 59, 89, 70, 18, 82, 72, 69, 12, 27, 100, 31, 81, 37, 17, 10, 67, 68, 58, 35, 92, 31, 96, 78, 46, 1, 47, 71, 96, 38, 17, 77, 45, 52, 33, 85, 3, 11, 49, 10, 51, 56, 24, 64, 49, 17, 40, 19, 36, 63, 58, 91, 41, 2, 45, 38, 47, 57, 12, 93, 48, 67, 5, 5, 44, 69, 66, 81]);
assert.equal(count, 3);
});
it('63', () => {
const count = getLoveTrianglesCount([15, 63, 49, 26, 40, 13, 22, 9, 35, 35, 14, 11, 3, 63, 36, 19, 9, 50, 60, 55, 29, 23, 7, 38, 2, 63, 54, 30, 39, 34, 50, 12, 4, 29, 8, 1, 45, 58, 59, 61, 44, 58, 20, 62, 46, 37, 0, 9, 13, 66, 32, 8, 15, 49, 43, 45, 37, 24, 13, 16, 5, 41, 11, 18, 34, 18]);
assert.equal(count, 12);
});
it('64', () => {
const count = getLoveTrianglesCount([12, 6, 0, 20, 18, 11, 6, 13, 8, 11, 6, 5, 13, 22, 5, 3, 3, 12, 8, 16, 6, 2]);
assert.equal(count, 1);
});
it('65', () => {
const count = getLoveTrianglesCount([22, 31, 23, 29, 11, 22, 19, 8, 6, 6, 23, 26, 18, 4, 38, 14, 32, 28, 36, 22, 37, 5, 23, 13, 23, 27, 12, 38, 14, 39, 32, 13, 7, 20, 26, 10, 27, 18, 23, 3]);
assert.equal(count, 3);
});
it('66', () => {
const count = getLoveTrianglesCount([7, 9, 5, 3, 4, 7, 6, 3, 6]);
assert.equal(count, 1);
});
it('67', () => {
const count = getLoveTrianglesCount([64, 13, 19, 247, 241, 142, 162, 179, 92, 207, 111, 146, 94, 265, 146, 89, 164, 141, 94, 266, 256, 81, 171, 23, 253, 240, 257, 23, 83, 121, 233, 151, 234, 119, 42, 52, 19, 262, 216, 100, 155, 176, 5, 189, 260, 210, 183, 156, 187, 161, 172, 184, 149, 191, 50, 229, 144, 164, 74, 171, 218, 105, 221, 189, 57, 197, 92, 124, 23, 240, 230, 58, 235, 202, 230, 36, 24, 46, 175, 97, 181, 75, 127, 15, 224, 252, 69, 169, 72, 152, 27, 114, 104, 37, 117, 244, 72, 215, 236, 265, 261, 179, 39, 205, 150, 2, 51, 141, 188, 158, 231, 132, 259, 9, 139, 21, 14, 203, 120, 96, 63, 194, 247, 184, 133, 96, 155, 244, 261, 119, 105, 139, 190, 11, 39, 25, 149, 101, 201, 241, 137, 119, 67, 180, 230, 110, 27, 225, 46, 75, 212, 213, 268, 42, 2, 135, 134, 193, 166, 204, 55, 109, 238, 72, 151, 142, 248, 151, 85, 110, 28, 134, 174, 254, 232, 187, 46, 267, 163, 57, 22, 185, 0, 203, 41, 224, 262, 71, 237, 138, 181, 152, 110, 212, 206, 199, 33, 181, 256, 77, 132, 59, 83, 70, 93, 171, 196, 132, 196, 78, 218, 53, 90, 208, 101, 103, 30, 108, 173, 83, 121, 234, 174, 95, 63, 1, 120, 153, 137, 244, 227, 232, 141, 197, 4, 198, 86, 22, 176, 245, 43, 176, 199, 75, 26, 184, 235, 232, 21, 100, 91, 62, 136, 173, 188, 243, 147, 257, 20, 215, 215, 49, 255, 216, 250, 130, 258, 228, 65]);
assert.equal(count, 28);
});
it('68', () => {
const count = getLoveTrianglesCount([4, 7, 15, 13, 4, 2, 6, 14, 0, 13, 6, 8, 5, 12, 17, 4, 3]);
assert.equal(count, 4);
});
it('69', () => {
const count = getLoveTrianglesCount([159, 36, 66, 143, 37, 44, 2, 26, 183, 154, 51, 154, 152, 96, 48, 157, 112, 173, 172, 35, 173, 113, 123, 84, 51, 31, 39, 180, 162, 104, 27, 35, 14, 156, 62, 54, 58, 183, 165, 181, 37, 52, 120, 99, 7, 64, 182, 171, 155, 127, 112, 11, 47, 2, 45, 59, 148, 39, 41, 192, 104, 174, 134, 29, 68, 12, 8, 60, 111, 174, 66, 24, 137, 9, 123, 141, 183, 30, 63, 149, 75, 73, 96, 72, 38, 184, 147, 172, 133, 110, 76, 163, 84, 54, 68, 115, 88, 1, 143, 170, 34, 117, 170, 150, 52, 39, 72, 119, 132, 19, 191, 127, 149, 29, 173, 50, 188, 2, 69, 52, 64, 89, 153, 84, 73, 0, 154, 135, 36, 21, 119, 173, 106, 16, 109, 121, 43, 61, 70, 99, 91, 34, 7, 71, 111, 151, 179, 68, 88, 61, 178, 8, 131, 188, 0, 142, 126, 51, 39, 189, 132, 115, 18, 149, 159, 109, 14, 15, 59, 51, 134, 97, 163, 35, 138, 187, 169, 146, 14, 57, 33, 37, 100, 39, 37, 112, 74, 114, 64, 147, 70, 68, 84, 170]);
assert.equal(count, 11);
});
it('70', () => {
const count = getLoveTrianglesCount([69, 147, 111, 190, 135, 163, 38, 28, 170, 106, 172, 137, 14, 135, 11, 91, 141, 144, 38, 83, 24, 87, 48, 57, 106, 152, 128, 94, 142, 75, 51, 14, 70, 166, 197, 152, 140, 130, 178, 3, 78, 16, 201, 107, 158, 149, 47, 138, 164, 123, 194, 142, 193, 131, 124, 100, 149, 113, 41, 36, 170, 159, 39, 11, 80, 64, 2, 124, 129, 198, 36, 135, 194, 37, 105, 27, 75, 68, 53, 193, 57, 131, 109, 42, 96, 107, 54, 34, 169, 19, 105, 158, 1, 8, 11, 113, 196, 200, 168, 117, 156, 193, 25, 91, 199, 190, 82, 95, 34, 180, 89, 151, 104, 43, 98, 192, 187, 172, 81, 142, 151, 93, 196, 78, 82, 85, 34, 97, 93, 19, 107, 149, 192, 64, 13, 40, 133, 196, 135, 74, 117, 195, 134, 88, 29, 171, 67, 76, 157, 134, 69, 60, 92, 51, 16, 17, 46, 153, 147, 56, 110, 6, 57, 18, 131, 127, 19, 80, 98, 92, 127, 95, 92, 70, 178, 123, 110, 182, 196, 177, 15, 39, 174, 132, 92, 62, 100, 127, 191, 200, 100, 137, 79, 81, 29, 50, 70, 174, 91, 4, 114, 23, 163]);
assert.equal(count, 23);
});
it('71', () => {
const count = getLoveTrianglesCount([218, 221, 148, 12, 146, 256, 58, 60, 208, 76, 148, 158, 48, 160, 74, 80, 192, 102, 82, 127, 196, 206, 230, 231, 22, 260, 191, 178, 90, 89, 223, 223, 21, 139, 90, 239, 92, 122, 160, 85, 135, 247, 239, 100, 92, 110, 192, 245, 113, 31, 28, 94, 8, 202, 0, 123, 107, 172, 225, 53, 115, 97, 193, 43, 196, 73, 64, 66, 62, 139, 34, 129, 68, 115, 108, 217, 194, 89, 146, 235, 67, 241, 35, 30, 198, 252, 27, 103, 84, 151, 52, 126, 192, 91, 199, 214, 161, 178, 184, 250, 106, 72, 186, 255, 157, 119, 201, 246, 190, 10, 187, 104, 208, 34, 159, 17, 23, 206, 42, 57, 185, 152, 121, 30, 68, 45, 236, 37, 90, 66, 221, 53, 218, 115, 89, 230, 136, 195, 71, 38, 125, 28, 243, 188, 185, 245, 231, 214, 227, 91, 129, 38, 210, 143, 132, 149, 113, 4, 61, 229, 72, 128, 144, 126, 26, 241, 155, 223, 250, 212, 129, 7, 77, 224, 241, 159, 177, 51, 180, 33, 229, 251, 134, 200, 262, 105, 251, 189, 144, 264, 87, 260, 221, 173, 184, 33, 20, 40, 90, 195, 57, 233, 225, 19, 186, 43, 67, 157, 33, 42, 41, 262, 147, 3, 32, 118, 10, 195, 39, 43, 162, 110, 50, 124, 123, 71, 223, 205, 39, 137, 213, 237, 54, 211, 16, 226, 52, 186, 263, 134, 19, 16, 231, 242, 13, 75, 119, 65, 136, 44, 111, 248, 53, 88, 112, 250, 178, 31, 39, 17, 129, 170, 36, 109, 43]);
assert.equal(count, 39);
});
it('72', () => {
const count = getLoveTrianglesCount([90, 151, 90, 178, 70, 67, 58, 72, 15, 170, 91, 175, 69, 162, 177, 2, 5, 94, 86, 93, 129, 68, 21, 160, 136, 39, 61, 157, 151, 5, 95, 164, 141, 41, 31, 121, 146, 159, 154, 162, 163, 1, 42, 26, 60, 114, 18, 45, 50, 14, 93, 127, 154, 168, 53, 127, 53, 149, 184, 48, 71, 68, 124, 54, 104, 137, 104, 122, 59, 68, 101, 107, 181, 152, 114, 95, 53, 61, 174, 11, 102, 34, 165, 51, 0, 151, 53, 52, 174, 114, 80, 118, 37, 47, 23, 59, 131, 49, 185, 159, 61, 161, 67, 103, 2, 103, 76, 73, 4, 149, 123, 7, 106, 1, 162, 56, 159, 123, 112, 114, 76, 62, 77, 142, 58, 137, 116, 66, 23, 85, 152, 100, 79, 73, 139, 167, 149, 88, 8, 16, 143, 153, 11, 44, 11, 129, 102, 23, 7, 86, 16, 97, 124, 77, 25, 41, 85, 51, 99, 93, 172, 50, 156, 56, 180, 137, 25, 64, 153, 51, 9, 182, 100, 139, 12, 30, 59, 130, 82, 181, 60, 94, 80, 154, 159]);
assert.equal(count, 19);
});
it('73', () => {
const count = getLoveTrianglesCount([27, 73, 58, 46, 16, 45, 59, 91, 67, 75, 12, 21, 3, 81, 56, 92, 72, 26, 50, 48, 11, 49, 43, 97, 38, 42, 44, 15, 84, 90, 6, 98, 88, 51, 30, 99, 2, 87, 22, 91, 76, 18, 89, 1, 31, 60, 29, 78, 39, 96, 79, 90, 64, 85, 76, 28, 14, 13, 68, 4, 63, 90, 74, 77, 86, 10, 83, 7, 40, 24, 77, 102, 37, 61, 66, 100, 53, 20, 34, 85, 57, 8, 9, 47, 93, 98, 25, 94, 23, 35, 69, 5, 54, 33, 36, 19, 70, 65, 95, 55, 14, 17]);
assert.equal(count, 31);
});
it('74', () => {
const count = getLoveTrianglesCount([9, 15, 1, 9, 16, 16, 17, 3, 18, 18, 11, 16, 13, 1, 12, 5, 12, 6]);
assert.equal(count, 0);
});
it('75', () => {
const count = getLoveTrianglesCount([51, 206, 108, 262, 9, 220, 50, 11, 91, 277, 221, 90, 23, 118, 232, 194, 263, 66, 187, 37, 244, 3, 139, 121, 179, 175, 197, 88, 110, 242, 119, 10, 215, 262, 38, 83, 167, 76, 276, 270, 10, 174, 249, 10, 201, 110, 97, 55, 100, 217, 247, 141, 253, 52, 230, 273, 69, 115, 82, 228, 217, 4, 175, 140, 9, 119, 72, 36, 171, 93, 6, 172, 223, 77, 47, 112, 174, 258, 122, 278, 16, 120, 83, 178, 67, 158, 60, 113, 50, 94, 22, 72, 114, 76, 66, 151, 83, 208, 209, 236, 210, 31, 277, 126, 139, 83, 247, 155, 80, 275, 96, 22, 186, 139, 17, 27, 186, 147, 95, 126, 168, 175, 45, 18, 121, 206, 273, 94, 203, 131, 250, 92, 146, 73, 251, 9, 74, 157, 256, 28, 218, 40, 11, 159, 232, 141, 11, 250, 13, 109, 47, 119, 55, 274, 108, 72, 76, 111, 242, 110, 90, 106, 92, 137, 204, 244, 153, 24, 244, 45, 57, 241, 145, 278, 190, 147, 20, 82, 148, 276, 90, 190, 157, 176, 37, 178, 223, 8, 157, 262, 125, 272, 215, 92, 248, 86, 172, 48, 235, 226, 252, 28, 182, 115, 237, 89, 186, 162, 235, 114, 205, 55, 17, 254, 186, 277, 122, 59, 12, 82, 83, 202, 156, 123, 30, 244, 168, 144, 100, 22, 32, 12, 98, 23, 44, 186, 23, 17, 120, 207, 165, 166, 67, 172, 103, 110, 255, 249, 17, 78, 83, 253, 61, 93, 265, 167, 22, 86, 224, 260, 50, 213, 104, 133, 122, 249, 201, 278, 228, 142, 138, 119, 90, 103, 194, 40, 260, 196, 49]);
assert.equal(count, 4);
});
it('76', () => {
const count = getLoveTrianglesCount([168, 195, 192, 34, 85, 99, 191, 96, 212, 80, 112, 73, 173, 25, 167, 37, 152, 175, 121, 38, 46, 76, 66, 45, 44, 142, 62, 55, 210, 213, 166, 35, 88, 103, 39, 211, 216, 183, 32, 119, 160, 17, 36, 14, 130, 49, 144, 170, 21, 87, 179, 31, 210, 125, 131, 98, 89, 27, 136, 94, 96, 58, 154, 73, 180, 105, 175, 41, 155, 50, 69, 74, 126, 143, 77, 206, 158, 104, 74, 196, 54, 118, 187, 53, 4, 143, 193, 132, 179, 199, 159, 65, 93, 27, 41, 156, 88, 201, 123, 147, 106, 101, 4, 134, 23, 122, 158, 88, 182, 143, 17, 150, 145, 18, 157, 48, 179, 128, 148, 29, 86, 101, 6, 63, 81, 64, 33, 82, 173, 111, 28, 97, 55, 78, 49, 141, 116, 144, 13, 121, 59, 179, 121, 183, 214, 4, 169, 40, 98, 11, 95, 111, 188, 124, 71, 8, 181, 75, 203, 95, 51, 121, 70, 40, 7, 52, 143, 205, 100, 116, 209, 49, 139, 126, 114, 134, 214, 213, 161, 92, 115, 211, 47, 18, 17, 140, 217, 209, 67, 38, 165, 168, 50, 37, 164, 10, 9, 212, 39, 24, 149, 191, 91, 50, 192, 22, 64, 77, 153, 84, 43, 197, 73, 113, 1, 194, 83]);
assert.equal(count, 47);
});
it('77', () => {
const count = getLoveTrianglesCount([81, 196, 105, 36, 181, 62, 134, 218, 7, 27, 14, 43, 89, 50, 123, 133, 37, 162, 172, 146, 154, 199, 152, 180, 86, 32, 215, 233, 49, 70, 65, 114, 29, 72, 2, 28, 224, 231, 73, 91, 231, 130, 227, 40, 61, 189, 151, 8, 33, 11, 229, 105, 159, 169, 129, 15, 8, 168, 25, 13, 227, 90, 179, 234, 45, 194, 210, 158, 118, 111, 122, 23, 176, 87, 64, 202, 35, 145, 117, 206, 212, 141, 190, 83, 109, 59, 144, 115, 225, 6, 44, 53, 125, 201, 132, 197, 58, 79, 46, 167, 13, 227, 221, 81, 200, 33, 223, 54, 214, 94, 30, 204, 219, 26, 175, 19, 98, 143, 76, 169, 183, 195, 56, 204, 217, 149, 118, 22, 173, 213, 147, 182, 165, 9, 129, 152, 202, 10, 139, 103, 163, 41, 69, 21, 186, 209, 213, 77, 83, 18, 160, 72, 66, 144, 24, 80, 2, 177, 92, 47, 101, 150, 82, 45, 16, 115, 174, 97, 108, 29, 17, 116, 135, 100, 166, 39, 68, 112, 193, 155, 142, 95, 191, 198, 188, 78, 23, 203, 99, 149, 121, 92, 63, 153, 71, 157, 164, 113, 128, 3, 110, 119, 185, 178, 68, 156, 195, 198, 20, 230, 90, 1, 42, 226, 10, 90, 93, 48, 198, 148, 140, 51, 12, 17, 13, 109, 45, 198, 222, 67, 142, 36, 73, 75]);
assert.equal(count, 59);
});
it('78', () => {
const count = getLoveTrianglesCount([286, 177, 26, 261, 260, 127, 292, 195, 161, 269, 187, 253, 272, 271, 182, 25, 300, 333, 120, 14, 276, 136, 68, 316, 308, 263, 178, 221, 224, 95, 188, 313, 54, 71, 184, 210, 55, 69, 354, 20, 38, 114, 113, 102, 154, 66, 168, 282, 53, 25, 300, 207, 105, 335, 58, 219, 344, 37, 333, 161, 192, 248, 128, 347, 200, 185, 205, 160, 193, 320, 285, 137, 214, 116, 279, 307, 191, 35, 288, 266, 152, 85, 284, 85, 309, 65, 251, 154, 229, 186, 179, 61, 131, 166, 100, 48, 1, 234, 353, 106, 184, 313, 40, 346, 49, 95, 307, 325, 238, 357, 153, 159, 172, 76, 304, 7, 341, 192, 10, 22, 12, 158, 139, 332, 243, 62, 201, 320, 56, 349, 258, 186, 65, 213, 303, 120, 163, 202, 105, 321, 36, 51, 233, 255, 298, 110, 197, 157, 75, 300, 102, 11, 221, 211, 92, 89, 112, 339, 157, 23, 46, 79, 184, 40, 129, 340, 109, 192, 136, 144, 93, 43, 238, 151, 185, 230, 289, 356, 332, 345, 253, 81, 280, 137, 255, 359, 152, 138, 312, 74, 233, 276, 10, 331, 181, 266, 352, 7, 10, 86, 228, 146, 125, 93, 215, 145, 15, 196, 98, 141, 204, 258, 228, 341, 67, 300, 71, 5, 355, 265, 236, 40, 200, 329, 175, 83, 182, 134, 156, 33, 59, 149, 77, 209, 164, 153, 89, 301, 3, 288, 325, 135, 203, 37, 92, 149, 332, 126, 213, 198, 14, 252, 195, 45, 175, 239, 207, 93, 27, 218, 25, 169, 337, 227, 204, 315, 252, 21, 193, 34, 251, 219, 232, 227, 69, 118, 168, 285, 149, 195, 334, 96, 181, 226, 34, 16, 254, 162, 330, 167, 44, 116, 303, 137, 75, 328, 275, 98, 189, 42, 173, 76, 242, 327, 102, 348, 302, 261, 84, 129, 296, 299, 44, 241, 196, 284, 140, 355, 338, 318, 317, 13, 88, 121, 314, 97, 115, 76, 29, 177, 221, 247, 343, 239, 346, 333, 347, 211, 122, 94, 73, 198, 336, 348, 206, 54, 315, 57, 129, 54, 261, 147, 204, 10, 56, 27, 146, 254, 132]);
assert.equal(count, 56);
});
it('79', () => {
const count = getLoveTrianglesCount([209, 6, 183, 144, 293, 51, 199, 194, 337, 237, 259, 205, 4, 253, 52, 125, 329, 314, 245, 241, 330, 221, 226, 178, 169, 113, 111, 244, 107, 150, 9, 96, 307, 194, 137, 288, 190, 88, 252, 330, 4, 95, 161, 296, 26, 44, 314, 53, 249, 297, 106, 279, 313, 15, 24, 150, 191, 219, 240, 273, 109, 35, 181, 1, 142, 324, 266, 85, 236, 256, 227, 51, 120, 68, 102, 152, 206, 26, 162, 293, 17, 8, 151, 14, 74, 131, 30, 143, 146, 293, 19, 275, 188, 234, 94, 224, 315, 303, 310, 23, 239, 309, 287, 319, 268, 72, 272, 138, 16, 222, 290, 330, 78, 122, 186, 11, 313, 256, 177, 33, 174, 304, 160, 121, 109, 28, 179, 97, 166, 115, 66, 325, 270, 55, 332, 251, 62, 139, 229, 231, 52, 264, 167, 13, 230, 282, 233, 139, 142, 87, 336, 308, 278, 37, 306, 297, 111, 136, 73, 252, 189, 103, 157, 36, 295, 269, 88, 299, 299, 3, 119, 71, 10, 210, 145, 55, 171, 133, 326, 264, 208, 33, 170, 94, 23, 130, 109, 22, 43, 154, 32, 39, 59, 82, 290, 185, 160, 56, 271, 281, 262, 137, 273, 324, 231, 216, 220, 63, 64, 121, 49, 5, 265, 223, 214, 77, 59, 239, 306, 132, 188, 286, 18, 32, 118, 100, 172, 286, 138, 175, 259, 3, 328, 95, 316, 329, 173, 189, 228, 193, 334, 9, 292, 126, 91, 82, 215, 218, 211, 135, 158, 123, 84, 60, 266, 335, 274, 26, 140, 315, 11, 152, 229, 149, 164, 154, 183, 330, 129, 178, 7, 29, 254, 99, 90, 108, 151, 280, 141, 153, 298, 89, 241, 120, 69, 322, 248, 164, 16, 27, 260, 294, 212, 243, 289, 46, 319, 200, 95, 17, 237, 56, 316, 114, 215, 58, 120, 76, 75, 274, 182, 81, 48, 223, 128, 98, 49, 31, 156, 70, 239, 228, 77, 131, 220, 127, 295, 147, 69, 105, 251, 250, 331, 283, 70, 83, 31, 99]);
assert.equal(count, 72);
});
it('80', () => {
const count = getLoveTrianglesCount([34, 374, 381, 78, 282, 252, 100, 183, 330, 387, 269, 203, 386, 291, 125, 206, 248, 251, 87, 74, 5, 337, 277, 106, 345, 112, 297, 129, 321, 60, 280, 151, 97, 232, 13, 58, 287, 131, 166, 140, 102, 300, 198, 383, 189, 171, 22, 110, 182, 164, 12, 288, 272, 64, 11, 188, 23, 146, 226, 123, 195, 10, 38, 262, 135, 306, 65, 149, 279, 377, 199, 240, 56, 286, 219, 162, 211, 191, 215, 284, 278, 245, 29, 43, 339, 19, 86, 14, 153, 281, 109, 168, 234, 214, 46, 274, 165, 66, 16, 378, 305, 326, 353, 213, 260, 249, 25, 335, 394, 216, 89, 296, 169, 202, 96, 15, 212, 357, 334, 243, 119, 72, 30, 204, 116, 158, 142, 201, 380, 221, 63, 395, 172, 70, 67, 284, 231, 9, 235, 382, 187, 347, 172, 392, 344, 36, 117, 263, 192, 105, 388, 71, 230, 149, 325, 256, 132, 318, 6, 151, 208, 315, 346, 174, 33, 261, 361, 390, 186, 340, 95, 338, 101, 50, 301, 320, 397, 156, 223, 103, 375, 369, 193, 196, 368, 113, 200, 73, 194, 179, 4, 154, 8, 45, 254, 247, 270, 84, 152, 141, 283, 356, 51, 257, 236, 99, 166, 225, 130, 85, 362, 147, 242, 376, 293, 48, 148, 328, 363, 117, 209, 269, 190, 312, 161, 295, 285, 218, 241, 89, 349, 1, 372, 42, 371, 331, 175, 308, 250, 122, 379, 104, 310, 239, 319, 17, 184, 246, 24, 244, 358, 159, 155, 61, 359, 178, 124, 27, 118, 150, 39, 54, 217, 163, 350, 348, 373, 328, 55, 323, 170, 343, 298, 115, 351, 37, 57, 294, 329, 341, 360, 21, 128, 332, 370, 20, 276, 365, 392, 181, 88, 289, 79, 81, 59, 26, 258, 307, 176, 234, 237, 44, 265, 302, 173, 98, 273, 336, 177, 120, 224, 311, 267, 299, 76, 266, 275, 126, 82, 299, 83, 367, 197, 145, 253, 41, 2, 228, 69, 138, 205, 136, 169, 121, 366, 238, 47, 143, 210, 271, 31, 382, 53, 324, 107, 264, 127, 316, 137, 303, 317, 233, 180, 322, 60, 114, 259, 18, 385, 90, 389, 77, 75, 3, 52, 108, 396, 391, 49, 227, 139, 352, 313, 327, 290, 94, 134, 7, 229, 28, 364, 40, 302, 381, 255, 35, 62, 32, 167, 92, 185, 292, 382, 91, 157, 322, 309]);
assert.equal(count, 126);
});
it('81', () => {
const count = getLoveTrianglesCount([351, 350, 297, 316, 338, 288, 55, 228, 23, 349, 267, 395, 164, 166, 81, 12, 189, 221, 11, 32, 327, 120, 255, 93, 240, 364, 39, 202, 253, 39, 204, 34, 253, 130, 246, 386, 162, 203, 356, 223, 365, 353, 96, 188, 157, 116, 293, 222, 381, 313, 120, 398, 358, 125, 184, 98, 89, 245, 156, 167, 110, 109, 259, 34, 57, 47, 165, 384, 162, 157, 13, 11, 286, 6, 201, 294, 375, 338, 188, 107, 12, 190, 291, 212, 19, 50, 232, 223, 65, 90, 203, 328, 227, 315, 265, 106, 359, 192, 341, 144, 341, 185, 59, 230, 348, 43, 166, 2, 208, 307, 331, 151, 329, 341, 270, 126, 200, 147, 93, 347, 158, 63, 269, 295, 379, 394, 4, 201, 361, 373, 186, 135, 79, 377, 173, 376, 354, 53, 175, 122, 248, 376, 297, 36, 141, 7, 284, 126, 230, 263, 159, 52, 113, 273, 238, 103, 322, 172, 112, 336, 217, 165, 58, 231, 186, 225, 85, 209, 338, 299, 2, 121, 64, 217, 98, 270, 316, 17, 397, 170, 210, 361, 232, 7, 362, 67, 278, 83, 66, 384, 327, 82, 390, 60, 334, 51, 188, 377, 392, 343, 235, 94, 51, 327, 73, 78, 233, 5, 227, 214, 163, 326, 285, 181, 50, 305, 352, 215, 390, 95, 304, 339, 335, 86, 167, 284, 336, 159, 307, 328, 75, 102, 269, 340, 202, 277, 50, 177, 359, 220, 151, 229, 398, 61, 269, 288, 47, 168, 51, 90, 210, 280, 268, 21, 198, 237, 266, 221, 42, 154, 370, 247, 370, 56, 239, 129, 140, 298, 58, 185, 227, 314, 99, 199, 202, 54, 314, 124, 27, 94, 99, 10, 171, 118, 217, 157, 346, 46, 207, 293, 72, 184, 247, 352, 236, 129, 360, 329, 180, 116, 102, 99, 386, 92, 207, 29, 61, 149, 374, 92, 336, 139, 237, 116, 280, 7, 26, 297, 125, 377, 311, 286, 167, 262, 112, 84, 126, 255, 399, 372, 387, 10, 113, 206, 380, 321, 367, 270, 48, 50, 59, 382, 360, 352, 393, 385, 397, 29, 182, 397, 298, 285, 272, 323, 110, 173, 337, 138, 380, 372, 349, 270, 93, 9, 381, 120, 313, 209, 244, 233, 250, 297, 125, 111, 185, 301, 68, 111, 276, 97, 214, 354, 313, 377, 8, 144, 351, 104, 254, 259, 247, 274, 134, 92, 27, 25, 208, 152, 65, 67]);
assert.equal(count, 29);
});
it('82', () => {
const count = getLoveTrianglesCount([170, 304, 258, 282, 158, 240, 22, 253, 293, 190, 320, 181, 200, 39, 235, 91, 277, 43, 216, 100, 312, 160, 133, 249, 6, 275, 95, 204, 220, 142, 47, 324, 88, 152, 331, 323, 141, 63, 120, 201, 77, 102, 7, 233, 2, 251, 116, 5, 150, 196, 34, 167, 296, 277, 146, 276, 275, 167, 319, 1, 315, 123, 280, 130, 197, 249, 62, 22, 167, 169, 324, 62, 175, 268, 329, 79, 128, 53, 221, 206, 305, 112, 135, 144, 177, 167, 219, 256, 318, 44, 239, 167, 240, 122, 28, 123, 234, 159, 237, 142, 89, 338, 96, 271, 187, 326, 22, 32, 293, 138, 238, 2, 56, 144, 160, 31, 64, 252, 12, 221, 272, 81, 103, 84, 247, 276, 319, 276, 117, 334, 112, 262, 175, 189, 325, 145, 138, 261, 179, 280, 35, 62, 165, 341, 144, 73, 156, 116, 1, 305, 267, 108, 256, 27, 204, 15, 57, 238, 315, 299, 120, 24, 6, 339, 321, 273, 123, 337, 342, 60, 120, 322, 200, 294, 265, 112, 328, 295, 235, 4, 308, 263, 281, 226, 144, 332, 211, 102, 103, 65, 169, 82, 236, 72, 24, 165, 190, 321, 255, 318, 237, 131, 98, 207, 193, 258, 288, 227, 283, 162, 105, 43, 275, 311, 3, 14, 103, 40, 4, 98, 186, 143, 63, 255, 147, 45, 322, 136, 113, 52, 163, 39, 90, 163, 139, 158, 40, 5, 16, 272, 74, 96, 163, 184, 214, 282, 145, 151, 130, 166, 122, 84, 225, 71, 321, 33, 130, 80, 108, 322, 137, 230, 180, 79, 182, 251, 168, 23, 83, 129, 232, 92, 0, 159, 59, 284, 344, 189, 292, 207, 123, 180, 323, 126, 299, 127, 6, 76, 92, 65, 338, 135, 247, 35, 118, 38, 159, 42, 88, 168, 7, 139, 275, 45, 320, 144, 343, 103, 92, 19, 306, 267, 49, 164, 204, 231, 207, 173, 183, 150, 224, 70, 95, 254, 319, 306, 74, 293, 121, 163, 103, 221, 204, 257, 201, 251, 267, 130, 200, 205, 185, 35, 221, 54]);
assert.equal(count, 25);
});
it('83', () => {
const count = getLoveTrianglesCount([52, 309, 200, 104, 15, 365, 81, 70, 326, 96, 70, 317, 37, 298, 374, 197, 195, 59, 210, 117, 196, 114, 359, 13, 106, 291, 234, 215, 317, 244, 314, 188, 11, 30, 375, 83, 24, 306, 126, 95, 47, 297, 114, 362, 19, 126, 278, 328, 297, 33, 207, 65, 89, 365, 6, 304, 186, 170, 358, 311, 56, 56, 348, 297, 230, 354, 382, 356, 381, 83, 95, 200, 44, 240, 340, 296, 321, 93, 84, 212, 94, 212, 302, 9, 204, 163, 321, 293, 155, 260, 235, 183, 342, 182, 134, 241, 313, 251, 244, 96, 39, 281, 243, 171, 187, 167, 150, 370, 90, 199, 176, 275, 223, 313, 320, 131, 374, 361, 198, 77, 284, 260, 300, 165, 379, 101, 373, 141, 302, 192, 317, 330, 244, 151, 312, 42, 117, 292, 290, 150, 29, 60, 350, 349, 334, 130, 127, 254, 121, 358, 39, 283, 112, 160, 369, 370, 211, 54, 60, 79, 237, 365, 72, 21, 50, 201, 206, 27, 186, 180, 4, 253, 75, 106, 123, 150, 262, 23, 327, 58, 173, 365, 66, 238, 197, 300, 318, 282, 220, 162, 346, 240, 384, 265, 340, 164, 387, 360, 223, 161, 318, 0, 178, 345, 135, 106, 56, 337, 72, 286, 184, 328, 218, 219, 91, 256, 148, 330, 40, 48, 127, 334, 110, 155, 167, 77, 355, 214, 6, 180, 118, 150, 58, 357, 215, 356, 200, 292, 176, 253, 137, 206, 369, 34, 231, 379, 93, 113, 276, 12, 213, 241, 179, 217, 347, 282, 86, 290, 13, 32, 336, 356, 342, 242, 156, 78, 123, 313, 238, 250, 140, 235, 86, 86, 47, 319, 291, 243, 231, 309, 73, 356, 87, 39, 179, 356, 147, 251, 320, 344, 295, 184, 374, 34, 342, 163, 164, 360, 153, 157, 338, 36, 136, 329, 203, 304, 66, 317, 326, 56, 159, 205, 76, 336, 25, 170, 141, 14, 249, 99, 120, 357, 19, 97, 144, 280, 285, 80, 69, 250, 116, 217, 15, 296, 338, 31, 203, 158, 38, 349, 180, 291, 244, 144, 85, 200, 35, 77, 306, 344, 294, 357, 384, 307, 142, 256, 224, 140, 121, 14, 231, 240, 138, 87, 158, 32, 264, 308, 278, 276, 85, 321, 331, 137, 347, 165, 59, 377, 107, 186, 2, 52, 258, 22, 24, 161, 16]);
assert.equal(count, 34);
});
it('84', () => {
const count = getLoveTrianglesCount([185, 128, 1, 300, 175, 170, 14, 92, 30, 21, 57, 294, 136, 138, 53, 171, 79, 189, 209, 6, 296, 298, 280, 39, 252, 263, 190, 101, 163, 125, 190, 26, 134, 180, 39, 15, 57, 1, 267, 108, 253, 254, 16, 93, 152, 187, 89, 84, 144, 102, 182, 176, 265, 164, 132, 83, 88, 148, 222, 137, 281, 273, 293, 160, 242, 194, 99, 25, 83, 153, 56, 4, 183, 256, 280, 102, 105, 100, 276, 87, 90, 201, 238, 11, 22, 41, 169, 259, 30, 278, 223, 191, 90, 265, 119, 272, 72, 125, 231, 210, 220, 83, 45, 60, 46, 46, 15, 184, 13, 185, 80, 68, 13, 40, 175, 167, 299, 65, 69, 246, 59, 232, 164, 128, 89, 274, 219, 236, 146, 261, 197, 116, 127, 166, 244, 109, 104, 7, 290, 135, 108, 207, 178, 195, 279, 214, 22, 273, 173, 149, 101, 179, 1, 14, 180, 168, 25, 230, 27, 276, 135, 212, 200, 286, 65, 33, 132, 74, 80, 155, 51, 266, 150, 33, 109, 269, 290, 251, 45, 84, 32, 171, 258, 26, 38, 80, 106, 196, 148, 159, 8, 275, 182, 295, 264, 197, 188, 163, 210, 29, 164, 59, 206, 302, 267, 96, 292, 107, 228, 78, 63, 87, 23, 129, 246, 289, 122, 228, 133, 28, 288, 121, 130, 288, 233, 69, 146, 12, 287, 94, 59, 290, 254, 160, 258, 2, 192, 102, 53, 161, 139, 118, 142, 257, 102, 72, 135, 246, 101, 180, 204, 68, 86, 225, 256, 168, 210, 73, 57, 145, 207, 238, 32, 144, 15, 159, 35, 130, 180, 160, 301, 206, 189, 210, 21, 17, 263, 93, 260, 213, 43, 223, 229, 13, 0, 54, 283, 114, 218, 241, 177, 261, 211, 228, 66, 10, 176, 147, 230, 72, 27, 251]);
assert.equal(count, 51);
});
it('85', () => {
const count = getLoveTrianglesCount([240, 198, 103, 109, 110, 333, 144, 255, 296, 48, 180, 241, 150, 36, 219, 268, 95, 328, 160, 178, 129, 95, 257, 23, 71, 15, 240, 231, 59, 1, 48, 260, 186, 112, 55, 300, 1, 193, 322, 68, 299, 188, 42, 144, 197, 314, 52, 236, 31, 173, 114, 313, 11, 263, 121, 47, 178, 1, 54, 168, 258, 42, 211, 3, 44, 294, 249, 78, 74, 170, 111, 15, 211, 295, 168, 42, 134, 95, 164, 92, 263, 280, 200, 190, 89, 175, 203, 142, 26, 185, 156, 323, 212, 256, 306, 78, 209, 144, 231, 261, 86, 102, 141, 301, 157, 259, 262, 135, 311, 63, 282, 236, 172, 52, 320, 159, 306, 224, 199, 315, 26, 94, 310, 117, 55, 190, 108, 6, 299, 57, 96, 46, 284, 68, 288, 47, 200, 247, 161, 253, 219, 123, 128, 285, 228, 286, 48, 278, 40, 141, 35, 66, 307, 185, 101, 222, 238, 266, 64, 293, 309, 209, 281, 209, 312, 178, 264, 15, 81, 315, 149, 95, 2, 237, 101, 91, 295, 130, 151, 271, 276, 28, 30, 131, 100, 55, 316, 29, 185, 228, 71, 298, 188, 137, 229, 207, 101, 330, 192, 95, 303, 94, 221, 267, 154, 147, 209, 122, 255, 194, 233, 316, 27, 18, 125, 319, 68, 205, 86, 189, 116, 16, 0, 98, 190, 163, 191, 48, 280, 40, 204, 133, 277, 66, 258, 147, 104, 173, 56, 240, 209, 237, 97, 317, 183, 332, 173, 288, 240, 256, 82, 258, 138, 87, 308, 122, 6, 254, 257, 197, 255, 12, 242, 205, 330, 211, 136, 222, 133, 178, 223, 26, 10, 190, 109, 133, 77, 284, 145, 9, 230, 199, 127, 318, 164, 280, 208, 90, 280, 85, 215, 222, 307, 167, 273, 63, 196, 307, 235, 72, 83, 94, 263, 213, 8, 259, 234, 8, 261, 324, 23, 124, 197, 279, 290, 67, 298, 147, 226, 133, 105, 224, 74, 81, 330, 142, 276, 157, 123, 103, 104, 116, 145]);
assert.equal(count, 6);
});
it('86', () => {
const count = getLoveTrianglesCount([145, 196, 33, 25, 74, 116, 118, 2, 146, 99, 50, 101, 83, 159, 0, 86, 52, 82, 129, 156, 69, 182, 37, 110, 129, 105, 48, 120, 164, 172, 61, 35, 151, 110, 21, 191, 103, 158, 119, 34, 188, 124, 160, 38, 181, 52, 3, 41, 164, 139, 5, 20, 120, 187, 20, 29, 149, 179, 74, 160, 73, 115, 22, 33, 142, 98, 53, 7, 85, 67, 190, 61, 31, 104, 77, 5, 92, 146, 115, 113, 100, 187, 164, 54, 99, 11, 33, 49, 54, 166, 97, 75, 186, 62, 45, 23, 86, 43, 162, 178, 107, 76, 23, 5, 170, 156, 186, 91, 193, 40, 49, 156, 115, 179, 188, 197, 190, 45, 2, 156, 181, 65, 106, 47, 196, 183, 49, 104, 130, 21, 119, 150, 90, 154, 162, 193, 33, 171, 150, 139, 19, 122, 115, 181, 69, 171, 113, 178, 197, 140, 64, 132, 8, 77, 20, 28, 37, 44, 80, 107, 186, 171, 82, 13, 184, 143, 74, 136, 168, 26, 135, 87, 76, 19, 158, 136, 147, 81, 137, 164, 95, 13, 57, 157, 14, 160, 84, 48, 13, 151, 17, 192, 168, 9, 46, 64, 57]);
assert.equal(count, 20);
});
it('87', () => {
const count = getLoveTrianglesCount([324, 77, 331, 155, 348, 15, 141, 61, 107, 176, 286, 131, 333, 72, 147, 197, 125, 191, 290, 385, 398, 1, 55, 105, 261, 265, 30, 166, 70, 239, 220, 388, 235, 235, 170, 107, 352, 181, 329, 215, 132, 97, 380, 132, 276, 305, 393, 293, 32, 350, 331, 218, 112, 227, 383, 179, 394, 134, 338, 110, 352, 218, 269, 141, 245, 282, 392, 339, 129, 222, 19, 102, 133, 53, 24, 100, 119, 249, 351, 367, 364, 305, 178, 297, 254, 203, 264, 290, 247, 308, 46, 115, 165, 387, 10, 327, 256, 375, 178, 108, 342, 14, 292, 12, 122, 336, 329, 76, 195, 295, 79, 151, 205, 188, 381, 189, 195, 50, 2, 342, 354, 24, 359, 34, 174, 114, 35, 150, 149, 15, 104, 223, 337, 45, 129, 176, 120, 301, 127, 40, 366, 237, 354, 154, 314, 116, 6, 223, 135, 385, 53, 11, 282, 270, 273, 278, 121, 43, 78, 160, 281, 357, 258, 206, 235, 296, 266, 138, 5, 127, 96, 356, 38, 17, 65, 300, 1, 369, 255, 318, 173, 347, 217, 109, 49, 163, 103, 265, 146, 115, 344, 11, 391, 145, 184, 281, 345, 260, 187, 244, 386, 362, 343, 5, 379, 303, 216, 271, 355, 272, 268, 242, 90, 156, 140, 370, 368, 397, 312, 378, 132, 29, 44, 314, 142, 153, 259, 299, 253, 10, 177, 84, 274, 268, 124, 57, 225, 208, 371, 198, 304, 398, 210, 264, 175, 329, 395, 359, 159, 188, 197, 51, 63, 294, 56, 42, 288, 186, 54, 240, 307, 48, 241, 305, 250, 291, 150, 389, 253, 144, 238, 243, 4, 373, 310, 134, 111, 214, 284, 5, 390, 226, 315, 306, 60, 192, 33, 367, 389, 71, 167, 187, 262, 85, 60, 28, 232, 76, 384, 136, 359, 323, 164, 263, 87, 279, 25, 213, 195, 364, 332, 245, 312, 194, 335, 162, 133, 392, 393, 68, 59, 40, 358, 22, 337, 372, 171, 248, 9, 356, 252, 363, 340, 49, 283, 370, 317, 321, 320, 13, 268, 137, 86, 18, 251, 69, 124, 204, 72, 118, 111, 8, 76, 157, 395, 9, 316, 216, 138, 59, 319, 396, 311, 275, 208, 64, 257, 183, 99, 207, 30, 382, 233, 53, 248, 259, 193, 31, 113, 158, 190, 326, 23, 228, 267, 94, 386, 49, 341, 196, 377, 180, 361, 236, 209, 202, 62, 212]);
assert.equal(count, 100);
});
it('88', () => {
const count = getLoveTrianglesCount([166, 176, 28, 248, 108, 94, 117, 130, 104, 286, 289, 156, 235, 61, 270, 89, 214, 80, 39, 133, 53, 147, 188, 63, 165, 235, 108, 189, 255, 82, 279, 30, 85, 146, 27, 62, 284, 12, 52, 255, 107, 98, 111, 26, 90, 142, 169, 223, 6, 249, 73, 183, 168, 51, 293, 201, 78, 280, 225, 287, 212, 200, 152, 192, 139, 228, 36, 194, 257, 173, 131, 76, 119, 193, 117, 112, 233, 278, 249, 266, 219, 32, 31, 184, 264, 93, 9, 262, 215, 182, 23, 10, 271, 49, 245, 265, 268, 263, 171, 278, 222, 115, 8, 87, 181, 135, 258, 35, 37, 193, 253, 72, 187, 245, 231, 34, 222, 230, 51, 294, 162, 6, 170, 47, 164, 232, 178, 71, 52, 261, 128, 22, 250, 292, 126, 118, 158, 197, 272, 186, 55, 212, 52, 268, 251, 116, 132, 68, 43, 11, 141, 24, 274, 97, 251, 247, 49, 216, 115, 126, 31, 203, 229, 208, 247, 185, 8, 21, 124, 155, 234, 199, 202, 175, 217, 192, 296, 95, 194, 163, 120, 45, 143, 227, 1, 220, 265, 91, 3, 237, 40, 2, 254, 58, 74, 124, 219, 191, 240, 36, 9, 70, 121, 25, 211, 92, 105, 125, 59, 4, 283, 46, 17, 213, 16, 137, 174, 148, 138, 140, 197, 7, 285, 36, 209, 225, 84, 153, 180, 136, 159, 281, 246, 99, 44, 65, 218, 15, 294, 172, 58, 177, 201, 69, 178, 77, 12, 210, 282, 20, 170, 263, 43, 74, 191, 88, 244, 41, 17, 276, 8, 256, 42, 33, 113, 18, 69, 154, 258, 109, 86, 65, 155, 228, 152, 121, 51, 57, 161, 194, 126, 79, 205, 109, 48, 92, 287, 177, 150, 174, 57, 43, 141, 181, 13, 288]);
assert.equal(count, 72);
});
it('89', () => {
const count = getLoveTrianglesCount([79, 26, 117, 114, 260, 241, 74, 262, 176, 140, 29, 118, 103, 219, 82, 14, 144, 224, 127, 95, 196, 236, 65, 241, 150, 217, 228, 246, 194, 3, 80, 250, 34, 121, 214, 204, 225, 55, 195, 44, 120, 72, 107, 198, 38, 15, 85, 229, 47, 133, 71, 222, 93, 202, 45, 152, 81, 4, 172, 251, 42, 235, 170, 261, 189, 110, 208, 177, 48, 82, 205, 61, 201, 155, 254, 77, 75, 144, 100, 237, 233, 46, 97, 242, 49, 197, 77, 215, 53, 32, 255, 153, 89, 145, 244, 122, 206, 182, 68, 1, 165, 210, 111, 50, 61, 28, 132, 159, 94, 160, 13, 64, 148, 58, 182, 129, 30, 228, 178, 210, 33, 146, 190, 240, 25, 5, 147, 115, 251, 149, 59, 43, 104, 231, 230, 86, 200, 199, 39, 243, 259, 52, 186, 191, 109, 96, 19, 158, 180, 125, 129, 232, 216, 164, 7, 101, 35, 113, 224, 66, 138, 168, 36, 212, 156, 97, 214, 213, 119, 226, 176, 131, 235, 84, 134, 245, 99, 169, 207, 130, 135, 128, 91, 123, 256, 209, 88, 83, 23, 184, 17, 257, 23, 11, 139, 203, 136, 40, 161, 249, 252, 206, 21, 163, 51, 83, 220, 234, 143, 41, 24, 154, 162, 157, 187, 92, 2, 22, 16, 179, 185, 142, 62, 108, 253, 63, 118, 227, 69, 181, 175, 56, 57, 67, 223, 218, 31, 239, 40, 141, 211, 174, 10, 20, 171, 106, 192, 91, 137, 90, 116, 73, 37, 77, 183, 221, 247, 114, 240, 126, 112, 265, 18, 7, 8]);
assert.equal(count, 79);
});
it('90', () => {
const count = getLoveTrianglesCount([180, 204, 95, 4, 127, 169, 198, 148, 107, 201, 225, 123, 119, 46, 136, 178, 6, 129, 191, 217, 163, 162, 128, 45, 158, 25, 18, 74, 77, 128, 3, 168, 63, 76, 225, 29, 77, 96, 20, 22, 111, 4, 214, 195, 153, 164, 155, 177, 145, 87, 222, 160, 116, 33, 109, 83, 202, 1, 97, 18, 136, 111, 27, 124, 147, 225, 59, 40, 171, 211, 65, 48, 76, 41, 184, 132, 70, 4, 125, 194, 182, 96, 158, 152, 3, 66, 134, 189, 70, 73, 219, 204, 92, 84, 183, 63, 33, 208, 47, 136, 168, 44, 76, 138, 145, 0, 50, 160, 131, 134, 84, 108, 174, 96, 167, 31, 139, 206, 107, 3, 38, 148, 170, 46, 161, 225, 39, 41, 190, 90, 132, 2, 11, 50, 123, 92, 132, 9, 7, 193, 46, 199, 87, 154, 210, 219, 196, 184, 180, 79, 70, 130, 120, 143, 99, 93, 220, 72, 54, 214, 173, 149, 114, 37, 38, 18, 126, 84, 150, 12, 5, 112, 117, 169, 188, 169, 19, 132, 34, 58, 118, 219, 194, 150, 180, 84, 171, 66, 168, 130, 177, 66, 163, 220, 102, 215, 44, 161, 206, 19, 154, 98, 98, 36, 120, 156, 149, 104, 7, 184, 77, 93, 64, 217, 149, 197, 43, 116, 120, 102, 26, 87, 127, 22, 188]);
assert.equal(count, 9);
});
it('91', () => {
const count = getLoveTrianglesCount([389, 272, 151, 186, 11, 179, 76, 235, 356, 28, 278, 193, 255, 168, 267, 97, 235, 21, 373, 222, 304, 127, 27, 72, 164, 341, 164, 65, 9, 286, 340, 16, 160, 43, 116, 360, 245, 237, 97, 313, 297, 287, 301, 71, 382, 216, 120, 108, 7, 37, 367, 70, 350, 354, 23, 96, 101, 67, 376, 12, 33, 308, 153, 17, 103, 250, 356, 248, 315, 139, 249, 200, 224, 369, 149, 392, 180, 266, 379, 175, 122, 202, 310, 307, 157, 317, 266, 205, 282, 246, 202, 153, 95, 365, 214, 127, 340, 21, 120, 274, 209, 204, 28, 307, 88, 138, 207, 271, 257, 333, 163, 9, 233, 83, 334, 251, 232, 251, 228, 228, 325, 59, 108, 305, 237, 20, 177, 3, 378, 148, 287, 309, 338, 342, 310, 44, 258, 167, 276, 293, 45, 317, 121, 382, 194, 323, 106, 300, 258, 206, 342, 153, 332, 376, 130, 320, 119, 90, 54, 197, 59, 203, 71, 295, 359, 113, 106, 207, 235, 153, 339, 197, 56, 263, 309, 121, 253, 8, 272, 314, 290, 172, 157, 107, 331, 303, 248, 362, 270, 132, 161, 326, 124, 67, 279, 140, 182, 189, 185, 24, 232, 355, 290, 272, 105, 382, 184, 180, 221, 148, 229, 319, 322, 93, 60, 300, 237, 269, 289, 328, 101, 126, 80, 301, 21, 359, 1, 157, 220, 283, 88, 308, 166, 323, 178, 285, 213, 381, 214, 133, 110, 131, 320, 91, 50, 258, 139, 305, 163, 311, 255, 10, 126, 0, 218, 7, 9, 90, 17, 314, 300, 358, 332, 90, 329, 188, 250, 162, 111, 198, 48, 360, 245, 78, 294, 247, 346, 212, 382, 233, 123, 360, 291, 216, 71, 327, 263, 328, 51, 162, 230, 51, 260, 318, 25, 234, 314, 95, 340, 284, 19, 1, 390, 98, 68, 40, 386, 363, 192, 114, 84, 29, 315, 77, 40, 162, 222, 226, 278, 348, 118, 237, 235, 313, 176, 171, 30, 229, 173, 286, 224, 381, 342, 183, 322, 131, 306, 103, 134, 39, 51, 110, 241, 246, 376, 246, 371, 309, 198, 181, 303, 207, 149, 159, 90, 257, 298, 352, 375, 204, 46, 266, 232, 51, 224, 62, 292, 228, 220, 344, 180, 100, 301, 92, 385, 122, 329, 222, 226, 162, 263, 3, 182, 289, 72, 104, 218, 158, 227, 351, 80, 7]);
assert.equal(count, 47);
});
it('92', () => {
const count = getLoveTrianglesCount([41, 106, 87, 34, 122, 7, 32, 11, 35, 59, 22, 67, 28, 47, 74, 81, 52, 102, 112, 127, 9, 8, 124, 119, 132, 111, 37, 42, 18, 20, 17, 6, 54, 40, 21, 134, 135, 24, 91, 4, 110, 13, 77, 108, 82, 78, 133, 96, 55, 126, 79, 31, 3, 58, 88, 128, 131, 33, 72, 95, 63, 46, 71, 44, 5, 86, 116, 101, 120, 104, 61, 10, 117, 98, 112, 60, 121, 62, 94, 78, 89, 99, 66, 36, 92, 83, 53, 49, 16, 73, 113, 114, 118, 51, 76, 105, 25, 15, 45, 50, 103, 29, 68, 136, 48, 57, 19, 64, 93, 1, 115, 107, 39, 85, 26, 12, 90, 109, 38, 130, 43, 65, 23, 123, 82, 100, 30, 129, 56, 69, 106, 97, 14, 84, 27, 70]);
assert.equal(count, 44);
});
it('93', () => {
const count = getLoveTrianglesCount([48, 10, 47, 71, 18, 26, 25, 9, 40, 66, 21, 18, 18, 42, 79, 66, 43, 69, 6, 51, 20, 10, 27, 80, 34, 48, 71, 31, 5, 12, 50, 47, 20, 57, 11, 58, 32, 17, 69, 38, 26, 72, 38, 74, 39, 1, 37, 41, 56, 28, 21, 86, 53, 15, 50, 78, 18, 90, 70, 56, 89, 60, 58, 89, 18, 22, 71, 35, 45, 76, 72, 4, 70, 57, 39, 73, 38, 60, 88, 89, 29, 40, 69, 1, 11, 60, 86, 75, 24, 36]);
assert.equal(count, 12);
});
it('94', () => {
const count = getLoveTrianglesCount([9, 21, 33, 3, 29, 20, 1, 28, 25, 32, 25, 6, 9, 30, 21, 26, 2, 30, 19, 7, 24, 19, 33, 5, 13, 14, 31, 35, 10, 26, 16, 11, 35, 4, 2, 35, 27]);
assert.equal(count, 2);
});
it('95', () => {
const count = getLoveTrianglesCount([13, 85, 94, 51, 33, 76, 50, 101, 60, 44, 45, 77, 27, 50, 40, 34, 27, 7, 39, 49, 84, 82, 69, 62, 12, 41, 15, 72, 51, 50, 97, 83, 79, 34, 49, 95, 0, 4, 69, 31, 100, 28, 95, 2, 11, 74, 88, 96, 36, 63, 96, 23, 88, 103, 59, 66, 100, 78, 66, 20, 101, 45, 102, 72, 46, 54, 104, 6, 75, 96, 22, 58, 103, 11, 80, 28, 75, 60, 66, 69, 84, 100, 7, 19, 90, 61, 44, 24, 61, 91, 14, 81, 2, 9, 30, 29, 92, 14, 100, 76, 85, 56, 66, 0, 16, 7]);
assert.equal(count, 3);
});
it('96', () => {
const count = getLoveTrianglesCount([153, 237, 231, 157, 82, 18, 376, 350, 49, 64, 105, 118, 327, 313, 160, 45, 200, 346, 17, 329, 325, 347, 240, 214, 271, 312, 372, 232, 270, 299, 328, 46, 319, 222, 64, 270, 27, 184, 244, 94, 222, 59, 331, 163, 12, 61, 328, 83, 174, 263, 346, 156, 81, 258, 378, 283, 273, 293, 301, 238, 176, 27, 88, 330, 16, 235, 376, 250, 154, 232, 131, 216, 316, 8, 280, 177, 385, 351, 29, 345, 261, 21, 152, 81, 107, 293, 296, 77, 165, 91, 96, 352, 166, 175, 34, 90, 236, 257, 304, 296, 141, 189, 173, 342, 149, 85, 106, 249, 146, 226, 80, 333, 166, 160, 367, 103, 12, 45, 238, 107, 385, 99, 152, 81, 3, 97, 142, 49, 79, 138, 245, 34, 118, 330, 235, 222, 205, 212, 360, 89, 324, 371, 60, 195, 60, 392, 76, 327, 205, 345, 242, 58, 20, 175, 376, 273, 135, 179, 10, 391, 297, 372, 316, 182, 140, 114, 84, 267, 358, 200, 84, 84, 348, 141, 69, 313, 147, 223, 149, 264, 232, 81, 189, 9, 40, 66, 102, 349, 187, 256, 329, 263, 33, 282, 178, 29, 8, 73, 82, 19, 207, 379, 210, 66, 367, 387, 259, 298, 20, 371, 10, 130, 353, 287, 376, 378, 245, 22, 331, 3, 59, 95, 195, 282, 151, 23, 27, 41, 25, 328, 125, 251, 321, 75, 157, 126, 243, 372, 23, 267, 80, 226, 259, 98, 61, 189, 268, 303, 357, 370, 337, 81, 248, 391, 2, 388, 244, 236, 237, 7, 53, 225, 203, 294, 340, 177, 170, 331, 372, 51, 305, 55, 52, 96, 28, 70, 272, 219, 32, 234, 55, 365, 372, 161, 202, 368, 24, 210, 169, 22, 94, 157, 371, 4, 250, 0, 284, 308, 18, 222, 310, 319, 250, 122, 25, 78, 188, 208, 342, 59, 340, 156, 61, 316, 324, 319, 360, 43, 73, 237, 77, 67, 325, 174, 160, 268, 309, 355, 153, 10, 191, 172, 339, 311, 235, 319, 232, 367, 263, 334, 163, 18, 123, 78, 358, 270, 218, 103, 307, 74, 344, 296, 44, 248, 31, 203, 382, 289, 51, 52, 222, 197, 16, 202, 140, 22, 158, 151, 339, 295, 288, 56, 107, 13, 319, 224, 355, 72, 364, 312, 122, 317, 384, 294, 88, 104, 335, 127, 45, 341, 114, 109]);
assert.equal(count, 48);
});
it('97', () => {
const count = getLoveTrianglesCount([183, 5, 139, 295, 200, 277, 94, 230, 50, 100, 218, 249, 55, 167, 177, 0, 147, 287, 298, 236, 213, 148, 157, 15, 17, 286, 16, 157, 54, 198, 91, 59, 102, 12, 215, 44, 195, 96, 147, 177, 254, 45, 180, 139, 300, 195, 86, 29, 163, 141, 90, 251, 154, 151, 240, 25, 280, 295, 247, 136, 232, 228, 12, 261, 252, 210, 41, 43, 278, 222, 53, 165, 299, 200, 49, 16, 259, 296, 197, 72, 141, 220, 79, 264, 257, 258, 246, 255, 57, 280, 284, 166, 84, 116, 136, 59, 218, 147, 189, 289, 163, 266, 103, 150, 136, 292, 221, 6, 143, 213, 91, 262, 223, 179, 129, 241, 277, 140, 39, 204, 269, 219, 88, 240, 49, 18, 153, 267, 30, 159, 124, 245, 58, 71, 60, 167, 162, 176, 22, 206, 9, 248, 69, 45, 27, 48, 164, 139, 140, 183, 29, 56, 296, 28, 210, 30, 192, 92, 213, 207, 3, 225, 178, 17, 80, 277, 91, 145, 272, 236, 125, 188, 45, 11, 186, 19, 25, 101, 122, 68, 15, 289, 104, 106, 3, 101, 277, 128, 127, 5, 36, 28, 132, 260, 251, 234, 176, 282, 261, 214, 236, 35, 201, 270, 97, 71, 7, 294, 10, 82, 131, 258, 89, 233, 202, 154, 288, 174, 155, 105, 293, 249, 231, 280, 137, 101, 65, 161, 29, 285, 113, 262, 200, 59, 210, 94, 41, 195, 221, 252, 250, 209, 8, 205, 109, 166, 234, 48, 264, 169, 222, 124, 55, 237, 123, 155, 81, 47, 282, 180, 61, 61, 173, 93, 69, 179, 227, 113, 81, 61, 226, 250, 298, 196, 118, 123, 108, 143, 146, 89, 46, 77, 125, 167, 8, 268, 56, 83, 53, 240, 292, 48, 19, 199, 133, 203, 171, 176, 290, 173]);
assert.equal(count, 31);
});
it('98', () => {
const count = getLoveTrianglesCount([7, 8, 3, 4, 0, 16, 17, 11, 10, 13, 21, 3, 18, 12, 1, 4, 12, 13, 5, 0, 8]);
assert.equal(count, 1);
});
it('99', () => {
const count = getLoveTrianglesCount([55, 26, 34, 27, 23, 46, 15, 35, 2, 12, 37, 22, 0, 3, 4, 7, 36, 29, 51, 19, 5, 6, 13, 21, 45, 45, 15, 26, 36, 14, 9, 0, 42, 14, 53, 18, 57, 42, 46, 3, 9, 35, 19, 59, 28, 22, 58, 45, 54, 2, 20, 44, 42, 42, 58, 23, 11, 1, 52]);
assert.equal(count, 10);
});
it('100', () => {
const count = getLoveTrianglesCount([145, 153, 193, 262, 97, 76, 138, 72, 293, 108, 102, 80, 261, 253, 218, 141, 49, 257, 135, 16, 122, 6, 55, 47, 44, 274, 136, 176, 104, 177, 267, 146, 295, 196, 103, 290, 181, 273, 18, 248, 178, 272, 63, 192, 284, 266, 211, 45, 83, 14, 105, 148, 186, 157, 159, 149, 19, 66, 40, 215, 119, 118, 37, 199, 246, 197, 240, 53, 166, 244, 230, 107, 123, 220, 165, 22, 218, 281, 96, 110, 297, 255, 17, 137, 301, 251, 187, 150, 71, 28, 161, 172, 296, 300, 27, 264, 249, 286, 288, 36, 292, 188, 182, 289, 258, 56, 8, 221, 223, 12, 115, 224, 169, 42, 174, 283, 74, 120, 216, 62, 93, 142, 147, 116, 213, 175, 277, 33, 133, 54, 113, 1, 227, 144, 57, 95, 298, 140, 32, 7, 20, 21, 75, 265, 132, 139, 73, 158, 106, 190, 280, 228, 156, 223, 235, 260, 130, 52, 23, 179, 252, 191, 31, 234, 143, 241, 94, 162, 131, 259, 214, 185, 155, 270, 226, 90, 247, 281, 271, 204, 63, 35, 222, 170, 92, 68, 189, 11, 87, 88, 168, 25, 238, 212, 46, 233, 58, 236, 242, 4, 82, 70, 67, 217, 85, 152, 60, 291, 119, 183, 24, 299, 294, 225, 207, 209, 180, 243, 13, 117, 10, 210, 269, 239, 171, 126, 129, 206, 131, 89, 26, 151, 34, 285, 173, 275, 98, 3, 112, 203, 69, 64, 77, 202, 250, 276, 30, 59, 5, 268, 9, 91, 50, 81, 201, 99, 39, 51, 184, 153, 219, 200, 208, 79, 134, 195, 163, 245, 109, 115, 160, 114, 279, 231, 198, 65, 287, 101, 38, 232, 41, 18, 124, 48, 164, 237, 127, 256, 29, 100, 263, 278, 251, 125, 128, 121, 254, 84, 194, 167, 205]);
assert.equal(count, 97);
});
});