Rezultati

Up. imeNalogaJezikRezultatČas oddaje
ctrl-alt-defeat-2019 Kvadrati C++ 100/100OK 09. maj '19 @ 19:09

Test Točke Porabljen spomin Porabljen čas Status
#1 [več] 2/2 3,230 MiB 0,000 s OK
#2 [več] 2/2 3,227 MiB 0,000 s OK
#3 [več] 2/2 3,199 MiB 0,000 s OK
#4 [več] 2/2 3,203 MiB 0,004 s OK
#5 [več] 2/2 3,203 MiB 0,000 s OK
#6 [več] 2/2 3,230 MiB 0,000 s OK
#7 [več] 2/2 3,230 MiB 0,000 s OK
#8 [več] 2/2 3,230 MiB 0,000 s OK
#9 [več] 3/3 3,203 MiB 0,000 s OK
#10 [več] 3/3 3,199 MiB 0,000 s OK
#11 [več] 3/3 3,203 MiB 0,004 s OK
#12 [več] 3/3 3,230 MiB 0,000 s OK
#13 [več] 3/3 3,203 MiB 0,000 s OK
#14 [več] 3/3 3,230 MiB 0,004 s OK
#15 [več] 3/3 3,227 MiB 0,004 s OK
#16 [več] 3/3 3,230 MiB 0,004 s OK
#17 [več] 3/3 3,203 MiB 0,004 s OK
#18 [več] 3/3 3,230 MiB 0,000 s OK
#19 [več] 3/3 3,230 MiB 0,000 s OK
#20 [več] 3/3 3,203 MiB 0,004 s OK
#21 [več] 3/3 3,199 MiB 0,004 s OK
#22 [več] 3/3 3,195 MiB 0,000 s OK
#23 [več] 3/3 3,227 MiB 0,000 s OK
#24 [več] 3/3 3,203 MiB 0,000 s OK
#25 [več] 3/3 3,203 MiB 0,004 s OK
#26 [več] 3/3 3,230 MiB 0,000 s OK
#27 [več] 3/3 3,203 MiB 0,004 s OK
#28 [več] 3/3 3,203 MiB 0,000 s OK
#29 [več] 3/3 3,203 MiB 0,004 s OK
#30 [več] 3/3 3,230 MiB 0,000 s OK
#31 [več] 3/3 3,203 MiB 0,000 s OK
#32 [več] 3/3 3,230 MiB 0,004 s OK
#33 [več] 3/3 3,199 MiB 0,004 s OK
#34 [več] 3/3 3,199 MiB 0,000 s OK
#35 [več] 3/3 3,230 MiB 0,000 s OK
#36 [več] 3/3 3,203 MiB 0,004 s OK

Ocenjevani program (kvadrati.cpp):
#include<bits/stdc++.h>

using namespace std;

int popcnt(long long a){
	int c=0;
	while(a){
		c+=a&1;
		a >>=1;
	}
	return c;
}

int msb(long long a){
	int c=0;
	for(int i=0;a;i++){
		if(a & 1) c =i;
		a>>=1;
	}
	return c+1;
}


int mem[64][64]={
{0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1},
{0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0},
{0,0,0,0,0,1,1,2,1,3,2,4,2,5,2,6,2,7,2,8,2,9,2,10,2,11,2,12,2,13,2,14,2,15,2,16,2,17,2,18,2,19,2,20,2,21,2,22,2,23,2,24,2,25,2,26,2,27,2,28,2,29,2,30},
{0,0,0,0,0,0,0,0,2,0,2,0,3,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0,4,0},
{0,0,0,0,0,0,0,1,0,2,3,4,5,6,8,9,10,11,12,13,14,14,16,16,17,17,19,19,20,20,21,22,22,23,23,25,24,26,25,28,26,29,27,31,28,32,29,34,30,35,31,37,32,38,33,40,34,41,35,43,36,44,37,46},
{0,0,0,0,0,0,0,0,0,1,1,2,4,5,7,10,13,17,18,23,21,32,25,39,27,51,29,60,30,71,32,82,35,95,36,108,38,123,39,138,40,155,41,172,43,191,44,210,45,231,46,252,47,275,48,298,49,323,50,348,51,375,52,402},
{0,0,0,0,0,0,0,0,0,0,0,2,2,6,7,8,14,13,24,18,32,26,41,33,47,37,55,43,58,47,61,50,63,52,66,55,67,57,70,59,71,60,73,62,75,64,77,66,78,67,80,69,81,71,83,73,84,74,86,76,87,78,89,80},
{0,0,0,0,0,0,0,0,0,0,0,1,1,2,6,6,14,14,29,26,48,42,73,58,99,75,122,90,150,107,175,119,200,130,213,140,228,149,237,154,249,163,259,169,266,177,275,184,283,191,290,196,298,202,305,207,312,214,318,219,325,225,331,230},
{0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,12,9,28,23,59,56,97,88,150,141,202,213,261,263,321,323,399,372,469,428,544,470,606,510,683,552,752,586,832,621,896,652,980,682,1049,713,1143,745,1217,777,1318,809,1400,841,1509,877,1597,911,1715},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,5,9,18,26,47,58,101,108,169,185,250,292,370,397,480,499,591,634,693,772,789,918,880,1049,964,1201,1039,1345,1099,1509,1152,1678,1193,1870,1229,2056,1259,2272,1289,2497,1315,2755,1343,3017,1362,3319,1381,3620},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,4,13,19,36,54,94,124,201,248,329,386,503,602,729,825,1006,1055,1277,1295,1568,1535,1844,1761,2116,1972,2333,2161,2531,2333,2716,2473,2898,2595,3052,2710,3191,2806,3306,2899,3412,2979,3515,3052,3611,3123,3711,3196},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,5,9,23,40,72,116,168,259,374,490,657,812,1069,1229,1540,1718,2105,2241,2691,2775,3362,3372,3973,3934,4584,4501,5205,5023,5718,5473,6148,5919,6558,6308,6901,6672,7225,6990,7479,7305,7736,7608,7947,7866,8160,8129},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,9,8,35,43,107,128,255,321,564,701,1035,1213,1751,1977,2661,2979,3779,4207,5062,5487,6440,6923,7893,8408,9392,9816,10830,11105,12223,12402,13525,13475,14754,14495,15866,15354,16886,16103,17848,16726,18753,17289,19613,17762,20447},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,5,14,22,52,103,173,283,433,685,951,1427,1856,2506,3235,4116,5120,6248,7484,8840,10342,11777,13479,15027,16828,18406,20309,21855,23928,25307,27444,28460,30989,31434,34337,34073,37512,36456,40560,38521,43532,40318,46313,41922,49169},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,12,24,59,102,200,330,523,865,1270,1851,2716,3631,4873,6288,8076,10063,12402,14794,17839,20706,24203,27411,31342,34926,39092,42780,47032,50839,55138,58772,62616,66474,69746,73896,76409,80870,82428,87217,87780,93436,92482,99070},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,5,7,22,46,123,200,401,624,1052,1582,2497,3472,5173,6733,9292,11941,15713,19291,24419,29076,35657,41085,49148,55332,64799,71104,81491,88248,99528,105749,117903,123450,136044,140311,153081,156496,169220,171443,183884,185061,197150,197245},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,10,24,55,121,237,455,774,1388,2054,3405,4835,7345,10062,13993,18508,24574,31161,39624,48980,60172,72276,86259,101109,117295,135109,152754,173252,191727,214138,232776,256877,275338,299842,317488,342114,358520,382155,397013,419370,432413},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,9,12,62,114,267,494,893,1520,2493,4082,6286,9441,13622,19225,26678,35769,47624,61370,78231,97566,120262,145815,174975,206681,241736,279494,319951,362948,407879,454500,502678,552282,601588,651659,701897,751736,800854,848353,896652},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,5,21,60,123,284,572,1066,1899,3121,5259,8195,12737,18704,27352,38168,52997,70776,94408,121866,156256,195273,242480,294599,355727,421721,498003,576879,667037,758480,860560,962617,1073789,1182778,1300233,1413762,1534578,1648219,1770364},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,8,13,49,133,243,579,1108,2091,3578,6116,10066,15759,24125,36233,51977,73917,102051,138034,183102,238707,305890,387150,480922,590808,714780,856768,1013167,1187684,1374224,1580376,1795058,2028882,2267232,2523072,2778812,3050253,3316982},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,21,36,139,283,611,1262,2331,4283,7451,12511,20238,31516,48370,71166,103375,145259,201412,272301,363024,473481,610971,772602,967286,1189558,1449930,1742791,2073140,2439281,2842655,3283152,3754350,4263997,4794755,5365067,5941171},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,5,10,50,106,270,566,1261,2540,4650,8640,14560,24602,39308,61695,93040,138908,199383,283526,390899,533212,709932,932349,1202134,1533361,1920436,2382318,2910576,3525357,4208837,4989866,5835554,6790673,7797717,8918146,10073769},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,6,6,39,114,304,654,1411,2798,5448,9929,17636,29568,49246,78390,121820,184745,272208,393949,555142,770732,1048116,1401515,1843149,2389245,3050538,3847818,4781004,5880830,7141238,8586426,10207924,12026323,14031501,16230543},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,14,39,100,302,639,1459,2955,5918,11094,20318,35210,59373,97347,154720,239578,361662,533192,768658,1088643,1509519,2058333,2757319,3640762,4726771,6063106,7663771,9579057,11813396,14425710,17407073,20816175,24630835},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,14,30,116,259,669,1419,3245,6341,12570,23147,42003,71258,120321,193853,308987,473502,714208,1048679,1514507,2138082,2973365,4049178,5446027,7191681,9386973,12049803,15318198,19173590,23793126,29121609,35354087},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,9,38,91,259,638,1437,3249,6745,13603,25607,47526,83655,143658,237470,385455,605735,931007,1398231,2056961,2962056,4192033,5824555,7963132,10710235,14199444,18555590,23940448,30483573,38358210,47713285},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,32,90,251,632,1488,3410,7264,14784,28944,54131,98241,170994,290326,478339,767779,1202059,1839030,2757412,4043343,5827628,8239749,11463004,15676328,21139108,28064060,36786770,47557784,60768108},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,5,28,62,257,594,1517,3365,7425,15733,31240,60485,110954,199209,345135,581912,953722,1525034,2377078,3631796,5423762,7955930,11444692,16197281,22523621,30874992,41651075,55475975,72815768},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,20,58,224,592,1494,3560,7839,16776,34252,67179,126702,231429,408295,701564,1171497,1907196,3032711,4713335,7171806,10701482,15668763,22542186,31872860,44378571,60844198,82271844},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,3,30,69,190,529,1456,3485,8051,17352,36631,72962,140886,262577,473028,829114,1411910,2345136,3798415,6016396,9320082,14155834,21078072,30847066,44336923,62732912,87373639},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,5,12,67,172,545,1386,3415,8094,18248,38716,79473,155650,296832,544029,974636,1687039,2857150,4705372,7588477,11956416,18475460,27959978,41601366,60755062,87351429},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,12,48,187,456,1323,3234,7817,18276,39529,84206,168322,328981,615058,1124953,1985213,3423563,5741359,9427267,15110300,23748626,36553244,55263712,82009206},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,6,13,41,138,467,1196,3378,7937,18732,41650,89584,182528,363002,691687,1286040,2312324,4058477,6930291,11568351,18864921,30144856,47161885,72443229},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,2,9,43,129,400,1152,3080,7899,18802,42688,93480,195094,394184,766167,1451445,2660101,4750206,8255368,14019103,23246763,37747471,60017250},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,11,34,122,390,1122,3053,7608,18904,43488,96707,206953,424901,844812,1624428,3029613,5501887,9734527,16794251,28323749,46730578},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,30,102,369,1004,2802,7428,18542,43870,99468,215849,453081,916027,1795035,3409347,6298773,11333931,19884152,34080778},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,3,9,37,88,347,915,2637,7216,18388,43716,102008,224137,479674,986412,1969264,3802278,7144796,13066399,23302520},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,5,25,79,302,860,2523,6764,17534,43377,102600,230988,502376,1052508,2135999,4198083,8018362,14909853},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,28,72,272,801,2402,6469,17436,42878,103408,236069,523725,1115408,2298603,4599907,8922817},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,16,66,207,717,2139,6095,16522,41827,102731,239754,539897,1168980,2452869,4984442},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,18,63,191,681,2020,5662,15958,40778,101947,241109,552752,1216472,2594797},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,10,51,164,569,1781,5257,14784,39537,98758,241090,558174,1256376},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,9,27,157,482,1627,4861,14177,37795,97725,239168,566342},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,11,34,123,471,1474,4542,13084,36217,94240,235718},
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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