@testset "891.sum-of-subsequence-widths.jl" begin
    @test sum_subseq_widths([2, 1, 3]) == 6
    @test sum_subseq_widths([2, 1, 1]) == 3
    @test sum_subseq_widths([1, 2, 3, 4, 5]) == 72
    @test sum_subseq_widths([3858, 3747, 3753, 2643, 4625, 1331, 4903, 1403, 1594, 3603,
                             728, 2472, 2769, 3113, 2691, 1587, 313, 4913, 2865, 530, 1190,
                             2843, 238, 2244, 1787, 2598, 4863, 1054, 2984, 4907, 1812,
                             1398, 3797, 4548, 2535, 4286, 1937, 3602, 3150, 3808, 1731,
                             4794, 276, 4195, 1527, 1809, 1001, 4429, 2268, 468, 1631, 1710,
                             3279, 1841, 3824, 3636, 730, 3491, 3084, 134, 1188, 3174, 4655,
                             2662, 1277, 185, 2088, 4613, 3557, 1357, 3489, 3738, 3620,
                             2257, 3295, 1194, 109, 4355, 3759, 2552, 2537, 760, 4296, 2522,
                             1962, 648, 828, 1295, 2618, 1425, 4671, 522, 390, 1620, 1028,
                             1608, 2734, 3383, 1559, 2249, 2551, 2495, 3181, 2909, 3430,
                             2955, 3050, 72, 1949, 4984, 1732, 4402, 546, 3819, 1915, 1817,
                             2128, 3175, 153, 273, 2993, 4194, 40, 827, 4046, 2265, 3181,
                             310, 514, 4146, 4132, 4060, 3363, 4509, 4847, 3249, 4626, 2907,
                             1685, 3153, 2730, 3044, 2724, 4658, 1651, 3815, 2385, 2319,
                             3036, 978, 743, 991, 3147, 3610, 2915, 3520, 904, 2292, 4321,
                             2591, 3806, 534, 4872, 2116, 4170, 3283, 4682, 2942, 2117,
                             2871, 3972, 3711, 177, 1525, 3658, 2317, 4027, 1148, 4250,
                             3592, 1252, 1715, 3884, 1157, 3405, 3818, 3603, 4086, 4879, 1,
                             2649, 1528, 4879, 3988, 3104, 779, 2050, 2725, 11, 1452, 4513,
                             3789, 3592, 2847, 7, 3911, 589, 2944, 2805, 2932, 2919, 3812,
                             2372, 1778, 4858, 1739, 1189, 98, 487, 3583, 644, 2437, 4889,
                             1717, 1726, 2459, 1087, 3171, 851, 4395, 1939, 873, 2579, 2741,
                             3622, 2719, 3925, 1700, 2801, 2428, 2718, 2029, 574, 758, 3753,
                             3244, 4313, 3786, 4101, 1423, 4213, 3525, 2152, 1289, 4793,
                             590, 717, 885, 4823, 1506, 1361, 1093, 4215, 173, 1725, 1509,
                             3656, 1520, 2294, 697, 657, 300, 4349, 2773, 745, 3788, 2018,
                             583, 1620, 2620, 802, 3782, 4603, 3455, 2942, 3596, 2536, 45,
                             1695, 4866, 2414, 2748, 1299, 3229, 1330, 1998, 1544, 934,
                             3657, 1918, 401, 235, 213, 612, 4160, 1758, 3547, 1321, 2991,
                             2829, 2690, 1648, 2552, 328, 2210, 4397, 3853, 4861, 3003,
                             4148, 4434, 2863, 1170, 1407, 3204, 2362, 870, 760, 2020, 60,
                             100, 4948, 3501, 4257, 597, 1537, 1616, 189, 1576, 976, 3190,
                             3020, 1584, 4952, 13, 4051, 3797, 3055, 3261, 4908, 3933, 2240,
                             4402, 1317, 2972, 2063, 1956, 4421, 3909, 4244, 2489, 2222,
                             4602, 3862, 371, 3867, 3056, 2210, 965, 534, 4698, 4369, 3552,
                             999, 2193, 4689, 3504, 4026, 3850, 4995, 886, 3914, 2681, 4316,
                             2633, 1229, 2160, 4186, 3505, 2570, 2068, 2315, 4858, 3564,
                             3173, 2739, 4467, 902, 3395, 314]) == 11231607
end