Заслуженный участник |
|
20/08/14 11670 Россия, Москва
|
Запустил обсчёт 19-252 с 41#, но памяти не хватило уже на 2-ю cg. У кого памяти побольше, прошу попробовать. Неудивительно, для неё размер ww[] больше 10.8млн элементов, а для 8-й и больше 13.3млн. Помните говорил про добавление if(hy<20, next) для просчёта только правых элементов vc[]? Если совпадут все несколько (больше трёх) правых - почти 100% что совпадут и все остальные. Немного оптимизированный вывод (убрал миллион пустых строк и добавил вывод #ww[], вычисляется командой vecsum(vector(#ww,k,#ww[k]))): (Оффтоп)
Код: o = 1 --> 43# : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 62, 978, 9166, 63284, 318312, 1217964, 3554848, 7817902, 12749554, 15353100, 13657622, 8949344, 4296066, 1503078, 382032, 68312, 7490, 324, sum = 69949440, #ww[]=6395682, time cg : 49,056 ms o = 2 --> 43# : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 370, 7454, 83302, 554110, 2343658, 6886820, 14717472, 23017668, 26256274, 21794666, 13070360, 5636184, 1753162, 393784, 60966, 5918, 228, sum = 116582400, #ww[]=10856982, time cg : 2min, 12,646 ms o = 3 --> 43# : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 194, 4462, 52140, 343184, 1352610, 3730918, 7758294, 12264294, 14466960, 12592304, 8107120, 3862064, 1376212, 368144, 68482, 7494, 324, sum = 66355200, #ww[]=6363136, time cg : 3min, 7,185 ms o = 4 --> 43# : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 1064, 17090, 154824, 840414, 2899928, 6816508, 11487344, 14132000, 12796800, 8501414, 4081776, 1421518, 365466, 66558, 7350, 324, sum = 63590400, #ww[]=6310685, time cg : 3min, 56,586 ms o = 5 --> 43# : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 170, 3602, 39302, 239922, 872018, 2209508, 4249984, 6289198, 6961156, 5621518, 3265462, 1328946, 366458, 64650, 6530, 296, sum = 31518720, #ww[]=2659555, time cg : 4min, 17,743 ms o = 6 --> 43# : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 2144, 29618, 209118, 799958, 1986422, 3614534, 5256190, 6183534, 5757556, 4165640, 2264226, 913452, 272754, 56332, 6846, 324, sum = 31518720, #ww[]=3025266, time cg : 4min, 41,154 ms o = 7 --> 43# : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 90, 1462, 14244, 117480, 673874, 2629336, 7376682, 15427664, 24250350, 28276622, 24145438, 14914374, 6609024, 2111456, 489800, 79310, 7970, 324, sum = 127125504, #ww[]=11688361, time cg : 6min, 15,224 ms o = 8 --> 43# : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 98, 1552, 16506, 139452, 815710, 3191036, 8908606, 18418544, 28368264, 32252954, 26832308, 16191866, 7038658, 2212586, 507592, 81882, 8170, 324, sum = 144986112, #ww[]=13359302, time cg : 8min, 8,132 ms o = 9 --> 43# : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 314, 3656, 32894, 215856, 994848, 3224318, 7411774, 12143008, 14225542, 11847146, 6915864, 2827730, 808362, 155566, 17770, 944, sum = 60825600, #ww[]=5584313, time cg : 8min, 55,893 ms o = 10 --> 43# : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 348, 7706, 79120, 470502, 1841702, 4950056, 9332998, 12482402, 11992332, 8276260, 4059966, 1430676, 374588, 69920, 7738, 324, sum = 55376640, #ww[]=5986525, time cg : 9min, 42,850 ms o = 11 --> 43# : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 106, 2758, 35396, 238622, 923728, 2427550, 4729392, 6939956, 7513914, 5832962, 3154390, 1131396, 256738, 36036, 2912, 128, sum = 33225984, #ww[]=3104091, time cg : 10min, 7,016 ms o = 12 --> 43# : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 564, 6772, 46560, 237596, 930288, 2656876, 5353054, 7727856, 8100980, 6152010, 3336608, 1277662, 347144, 64952, 7270, 324, sum = 36246528, #ww[]=3657781, time cg : 10min, 33,625 ms o = 13 --> 43# : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 694, 7040, 56338, 319878, 1275682, 3567464, 6873738, 9013236, 7967246, 4707352, 1859170, 497088, 90556, 10430, 584, sum = 36246528, #ww[]=3373654, time cg : 11min, 459 ms o = 1 --> 43# : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 206, 4406, 40330, 254972, 1074862, 3053536, 5924564, 7945912, 7409686, 4784184, 2143798, 663298, 136682, 16698, 944, sum = 33454080, #ww[]=3613134, time cg : 11min, 28,549 ms o = 2 --> 43# : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 2252, 27004, 170174, 702838, 2101294, 4568224, 7062686, 7721150, 5985374, 3244722, 1212116, 313670, 58224, 7382, 440, sum = 33177600, #ww[]=3117440, time cg : 11min, 50,857 ms o = 3 --> 43# : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 168, 3830, 45496, 308728, 1267138, 3649770, 7950914, 13141440, 16106152, 14385800, 9322378, 4370790, 1490966, 374912, 66880, 7370, 324, sum = 72493056, #ww[]=6891855, time cg : 12min, 43,946 ms o = 4 --> 43# : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 128, 3326, 36664, 252478, 1136738, 3560872, 7954544, 12691148, 14522500, 11967168, 7113456, 3067308, 977664, 234644, 39998, 3958, 156, sum = 63562752, #ww[]=6139040, time cg : 13min, 34,943 ms o = 5 --> 43# : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 1050, 10004, 72856, 392436, 1496060, 3998642, 7377112, 9326450, 8036022, 4680886, 1838770, 491426, 89738, 10362, 584, sum = 37822464, #ww[]=3592478, time cg : 14min, 8,204 ms o = 6 --> 43# : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 666, 12142, 113196, 599060, 1961416, 4201910, 6140460, 6298234, 4615954, 2429510, 937296, 273744, 57088, 6990, 324, sum = 27648000, #ww[]=2804151, time cg : 14min, 29,723 ms 32 cg = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 264, 5700, 77336, 755716, 4802258, 20060864, 59735190, 131623740, 214724476, 256608174, 223021162, 140133036, 63394106, 20802768, 5016056, 852764, 88484, 3624, 0] 1141705728, time: 14min, 29,723 ms
29 do = [2, 8, 14, 16, 18, 20, 22, 24, 26, 28, 32, 36, 38, 44, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 74, 78, 80, 82] o = 1 --> 43# : 0, sum = 0, #ww[]=0, time g2: 1,090 ms o = 2 --> 43# : 0, sum = 0, #ww[]=0, time g2: 1,094 ms o = 3 --> 43# : 0, sum = 0, #ww[]=0, time g2: 1,098 ms o = 4 --> 43# : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 36, 774, 8006, 50072, 237232, 902956, 2622888, 5472936, 7950644, 7785940, 4932774, 1896700, 401196, 39734, 1152, sum = 32303040, #ww[]=1597513, time g2: 13,754 ms o = 5 --> 43# : 0, sum = 0, #ww[]=0, time g2: 14,561 ms o = 6 --> 43# : 0, sum = 0, #ww[]=0, time g2: 14,565 ms o = 7 --> 43# : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 468, 10070, 95452, 546912, 2085698, 5317732, 9154222, 10802580, 8730060, 4771978, 1729498, 396800, 53218, 4444, 256, sum = 43699392, #ww[]=3007649, time g2: 38,912 ms o = 8 --> 43# : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 80, 1190, 10484, 71494, 359656, 1317852, 3491926, 6777070, 9910774, 11235920, 9993646, 6897350, 3638018, 1427374, 400952, 75116, 8144, 360, sum = 55617408, #ww[]=4692793, time g2: 1min, 12,781 ms o = 9 --> 43# : 0, sum = 0, #ww[]=0, time g2: 1min, 14,677 ms o = 10 --> 43# : 0, sum = 0, #ww[]=0, time g2: 1min, 14,681 ms o = 11 --> 43# : 0, sum = 0, #ww[]=0, time g2: 1min, 14,684 ms o = 12 --> 43# : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 326, 12436, 127474, 654570, 2043270, 4144246, 5639900, 5316368, 3577914, 1758790, 631804, 158912, 24902, 1728, sum = 24092640, #ww[]=2394171, time g2: 1min, 32,750 ms o = 13 --> 43# : 0, sum = 0, #ww[]=0, time g2: 1min, 33,626 ms o = 14 --> 43# : 0, sum = 0, #ww[]=0, time g2: 1min, 33,630 ms o = 15 --> 43# : 0, sum = 0, #ww[]=0, time g2: 1min, 33,633 ms o = 16 --> 43# : 0, sum = 0, #ww[]=0, time g2: 1min, 33,637 ms o = 17 --> 43# : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 454, 9368, 91560, 499294, 1753660, 3996050, 6080084, 6366728, 4395962, 1823502, 420106, 51264, 3178, 96, sum = 25491312, #ww[]=1653829, time g2: 1min, 46,214 ms o = 18 --> 43# : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 36, 428, 3622, 26958, 142284, 528758, 1426272, 2956850, 4853196, 6376006, 6620838, 5223632, 2993882, 1214020, 346242, 67550, 7864, 360, sum = 32788800, #ww[]=3406051, time g2: 2min, 9,015 ms o = 19 --> 43# : 0, sum = 0, #ww[]=0, time g2: 2min, 10,319 ms o = 20 --> 43# : 0, sum = 0, #ww[]=0, time g2: 2min, 10,323 ms o = 21 --> 43# : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 410, 7076, 66340, 352970, 1194434, 2750922, 4457824, 5107768, 4120104, 2356230, 947564, 258924, 44444, 3984, 120, sum = 21669120, #ww[]=2167343, time g2: 2min, 24,417 ms o = 22 --> 43# : 0, sum = 0, #ww[]=0, time g2: 2min, 25,505 ms o = 23 --> 43# : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 222, 4834, 48636, 271998, 945190, 2175316, 3423892, 3746532, 2869492, 1580026, 648214, 200276, 44978, 6636, 476, sum = 15966720, #ww[]=1324091, time g2: 2min, 35,615 ms o = 24 --> 43# : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 152, 2874, 29044, 159668, 578786, 1554592, 3258774, 5416556, 7008548, 6916034, 5153748, 2897424, 1198394, 348912, 64522, 6290, 240, sum = 34594560, #ww[]=2915128, time g2: 2min, 57,914 ms o = 25 --> 43# : 0, sum = 0, #ww[]=0, time g2: 2min, 59,322 ms o = 26 --> 43# : 0, sum = 0, #ww[]=0, time g2: 2min, 59,326 ms o = 27 --> 43# : 0, sum = 0, #ww[]=0, time g2: 2min, 59,330 ms o = 28 --> 43# : 0, sum = 0, #ww[]=0, time g2: 2min, 59,334 ms o = 29 --> 43# : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 180, 4054, 39984, 235148, 880254, 2164954, 3532536, 3844716, 2774858, 1303700, 381406, 62478, 4306, sum = 15228576, #ww[]=889495, time g2: 3min, 8,103 ms 14 do = [2, 4, 10, 14, 16, 18, 20, 22, 24, 26, 28, 32, 34, 36] o = 1 --> 43# : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 66, 1594, 22858, 175780, 817120, 2560912, 5776020, 9846850, 13158552, 13873848, 11262724, 6801408, 2976258, 927302, 199366, 26578, 1564, sum = 68428800, #ww[]=5732817, time g2: 3min, 51,154 ms o = 2 --> 43# : 0, sum = 0, #ww[]=0, time g2: 3min, 53,308 ms o = 3 --> 43# : 0, sum = 0, #ww[]=0, time g2: 3min, 53,312 ms o = 4 --> 43# : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 614, 11038, 95072, 419404, 1105570, 1897212, 2258954, 1906280, 1153442, 503636, 155952, 32532, 4124, 240, sum = 9544080, #ww[]=888056, time g2: 3min, 59,173 ms o = 5 --> 43# : 0, sum = 0, #ww[]=0, time g2: 3min, 59,489 ms o = 6 --> 43# : 0, sum = 0, #ww[]=0, time g2: 3min, 59,492 ms o = 7 --> 43# : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 56, 1896, 24366, 168834, 743072, 2202988, 4568714, 6858720, 7686566, 6658110, 4614110, 2566306, 1109230, 350954, 73178, 8380, 360, sum = 37635840, #ww[]=3465980, time g2: 4min, 23,522 ms o = 8 --> 43# : 0, sum = 0, #ww[]=0, time g2: 4min, 24,827 ms o = 9 --> 43# : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 130, 3660, 51096, 382084, 1660050, 4708248, 9081922, 12300802, 12509218, 9931264, 6006170, 2627154, 798092, 166920, 23534, 1848, sum = 60252192, #ww[]=4311369, time g2: 4min, 59,087 ms o = 10 --> 43# : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 2202, 42860, 346672, 1587430, 4719136, 9659124, 14181926, 15369352, 12777742, 8632896, 4853440, 2169834, 723926, 173478, 28668, 2856, 120, sum = 75271680, #ww[]=6063004, time g2: 5min, 51,628 ms o = 11 --> 43# : 0, sum = 0, #ww[]=0, time g2: 5min, 54,140 ms o = 12 --> 43# : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 2510, 30116, 186640, 735540, 2032950, 4204198, 6675126, 8096466, 7218448, 4545850, 2008800, 626176, 134626, 17886, 1060, sum = 36516480, #ww[]=3282648, time g2: 6min, 17,959 ms o = 13 --> 43# : 0, sum = 0, #ww[]=0, time g2: 6min, 19,280 ms o = 14 --> 43# : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 598, 8582, 61266, 299382, 1020714, 2492358, 4437700, 5794788, 5520652, 3751368, 1745116, 522884, 91470, 7220, sum = 25754112, #ww[]=1169323, time g2: 6min, 28,319 ms 33 g2 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 170, 3604, 48206, 447122, 2785964, 11687424, 34280344, 71859338, 110265618, 127304612, 112884450, 77799768, 41740194, 17177522, 5263558, 1138904, 156686, 11024, 240, 0] 614854752, time: 6min, 28,319 ms
vc --> 43# : [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 200, 4388, 62250, 597578, 4095698, 19950162, 70830668, 189299666, 393761286, 640766352, 799745620, 751508628, 526104394, 274213182, 108116116, 33212590, 8087164, 1503122, 187988, 12224, 0] 3822059280, time: 20min, 58,043 ms Строка для vc[] не совпадает с правильной, вообще.
|
|