답안 #1066988

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1066988 2024-08-20T09:20:31 Z 김은성(#11121) Present (RMI21_present) C++17
29 / 100
3488 ms 604 KB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int K = 40;
const int gap = 250000;
int g[45][45];
int gcd(int a, int b){
	if(b==0)
		return a;
	return gcd(b, a%b);
}
bool good(ll mask){
	int i, j;
	for(i=2; i<=K; i++){
		if(!((mask & (1ll<<(i-1)))))
			continue;
		for(j=i+1; j<=K; j++){
			if((mask & (1ll<<(j-1))) && !(mask & (1ll<<(g[i][j]-1))))
				return false;
		}
	}
	return true;
}
void printset(ll  mask){
	vector<int> ans;
	int i;
	for(i=1; i<=K; i++){
		if((mask & (1ll<<(i-1))))
			ans.push_back(i);
	}
	printf("%d ", ans.size());
	for(int u: ans){
		printf("%d ", u);
	}
	printf("\n");
}
ll crit[150235] = {0, 2929323, 6415551, 10806271, 16875563, 21406199, 27398715, 34312779, 37996375, 41444215, 47466703, 52983323, 58218911, 67157551, 71702511, 77636847, 85307503, 92611695, 102168543, 107327983, 115369951, 122966431, 133960639, 138898943, 145427647, 153851807, 163659647, 171158271, 177042815, 186661311, 195509247, 205768575, 216122559, 228131327, 239768959, 251706815, 265554303, 270961519, 274333407, 278493919, 284435415, 289508719, 294690527, 302373039, 306146687, 309384407, 315099055, 321032331, 325960347, 334374651, 339810053, 345032631, 352927583, 359976031, 369956363, 375402635, 382573487, 390446511, 400829151, 406969629, 413083375, 421668507, 430289115, 438970139, 444714719, 453796063, 462230715, 473178999, 482943919, 494668511, 507589687, 518387423, 531634543, 541312167, 549603639, 560268791, 572835271, 579821247, 591206111, 605340823, 616833207, 636047039, 647032575, 664845759, 678626151, 696751803, 711878335, 729913595, 752552943, 778191343, 805651231, 811912303, 822161563, 834821943, 843482731, 852438587, 863457079, 877069175, 891401143, 908723183, 921961143, 940687727, 954081007, 973973211, 986877423, 1008087415, 1030753663, 1056185071, 1075004959, 1078362583, 1081891135, 1087443855, 1092852607, 1097509951, 1105360703, 1109845663, 1113627215, 1118114471, 1124345895, 1129357423, 1136479039, 1143138207, 1147864327, 1155546191, 1162610431, 1172348063, 1178677551, 1184674527, 1193154399, 1201414783, 1210258439, 1215117391, 1223833215, 1231455279, 1242246975, 1247914399, 1256156415, 1264233727, 1275608991, 1283510495, 1295885951, 1309539647, 1318396767, 1331148127, 1343045023, 1346583591, 1349767503, 1355200431, 1360744639, 1365520647, 1372723239, 1378034407, 1381436783, 1385973055, 1392250783, 1397175263, 1403603775, 1410951807, 1415848495, 1422958495, 1430406463, 1439345151, 1446351887, 1452017823, 1460534079, 1468310991, 1477976287, 1483102047, 1491402959, 1499230335, 1510266687, 1515467343, 1523149631, 1531551903, 1543530911, 1550654623, 1562765119, 1577342495, 1585478047, 1598324831, 1611914303, 1618155887, 1628776287, 1642620543, 1649817455, 1659268543, 1671615167, 1684046159, 1698972831, 1715582287, 1729577279, 1747392119, 1761883295, 1780831391, 1795240223, 1815872351, 1842813439, 1865240191, 1882658863, 1890195263, 1901206079, 1914457727, 1920994935, 1931858015, 1946481871, 1956961727, 1974952319, 1987396943, 2003982143, 2019821327, 2036655551, 2053244351, 2070011519, 2091209023, 2118481055, 2147499839, 2150901447, 2154529519, 2162578879, 2168669631, 2176517631, 2183458959, 2187445535, 2194260735, 2201334879, 2208635039, 2217529215, 2223353279, 2234282879, 2246053631, 2252930943, 2262346495, 2271519199, 2283807615, 2288950847, 2300631679, 2311617791, 2319854655, 2328804095, 2338681727, 2351859151, 2364993535, 2381624831, 2390828735, 2406329471, 2418160719, 2421732607, 2427770559, 2435126231, 2440496287, 2450469759, 2454301503, 2459301631, 2467923615, 2473415167, 2484131263, 2489588799, 2500129087, 2508047487, 2519467215, 2525897215, 2537167359, 2550304127, 2555472639, 2565647071, 2574100543, 2586302079, 2592546303, 2604318975, 2617709007, 2626520767, 2641215103, 2655912223, 2670555775, 2686501087, 2694408191, 2708542783, 2722337599, 2734727487, 2751622655, 2765834239, 2787417727, 2804160063, 2823489215, 2843599615, 2862368767, 2888099135, 2920201087, 2952562687, 2959360543, 2973086335, 2988582719, 2997065455, 3010876031, 3026760255, 3050370559, 3065024959, 3088463103, 3105941151, 3125649087, 3146055935, 3175361791, 3206650111, 3223508255, 3227129983, 3233254143, 3240473711, 3245925631, 3255846975, 3259675359, 3264840895, 3273421055, 3278828671, 3289489215, 3294933183, 3305477663, 3313567167, 3324842191, 3331425695, 3342714495, 3355677279, 3360941439, 3371116031, 3379521151, 3391663775, 3397993727, 3409895679, 3423111743, 3432176127, 3446743807, 3461385343, 3476067071, 3490534749, 3494274879, 3498415007, 3507053055, 3512710399, 3523253455, 3526894463, 3530720031, 3540038895, 3545385215, 3555702463, 3561497807, 3569993471, 3579059839, 3591398015, 3597026591, 3608216127, 3618176255, 3627815423, 3634966239, 3645338751, 3658098559, 3664056351, 3675064383, 3685690367, 3697091199, 3711275135, 3727069647, 3739951615, 3758104655, 3764683919, 3778452735, 3793916223, 3802419647, 3816256767, 3832140415, 3855889919, 3870414271, 3893864703, 3911289599, 3931024255, 3951494847, 3980723327, 4012071423, 4030969519, 4043364159, 4060193567, 4066775871, 4081131839, 4097414719, 4114966079, 4133511327, 4153263103, 4171571967, 4196393983, 4213458175, 4237406719, 4268568191, 4296171263, 4301501895, 4309730503, 4317525727, 4328880199, 4334269639, 4342780815, 4351462975, 4363019743, 4370546639, 4380394855, 4392671159, 4401418143, 4412687381, 4425291175, 4435035229, 4448075679, 4463465295, 4474012751, 4488364863, 4502914087, 4519060319, 4535825871, 4552976031, 4565910567, 4571981287, 4580588719, 4588699941, 4598386855, 4604567335, 4614042983, 4622597687, 4633060647, 4641033423, 4651819319, 4664447831, 4672504999, 4683492511, 4697763879, 4706390493, 4719499711, 4734203215, 4746253487, 4762113375, 4775073023, 4793328991, 4807990479, 4827876847, 4840298551, 4857216191, 4872027431, 4888806615, 4906571735, 4931251903, 4947543783, 4971104079, 5000444591, 5025020607, 5057146687, 5091890495, 5108816047, 5125806783, 5140583783, 5157509023, 5175178599, 5200430911, 5216671591, 5239757935, 5269107527, 5293751103, 5326560895, 5360670015, 5373179191, 5379220519, 5387726527, 5397402839, 5405676647, 5411983655, 5421278695, 5431951783, 5440550695, 5449477479, 5459722143, 5471585879, 5480574399, 5491742295, 5504816221, 5515844175, 5528963519, 5541793487, 5555339615, 5571297639, 5585321039, 5604157263, 5618560335, 5637488335, 5642529655, 5650188903, 5658462999, 5668644007, 5675431507, 5683394471, 5692072999, 5704259271, 5710395343, 5721102733, 5731341215, 5742331239, 5751778407, 5763536287, 5775854989, 5788204191, 5802685151, 5813320527, 5826908319, 5842993493, 5857744335, 5876033231, 5891323223, 5908991783, 5922692149, 5940861759, 5954479791, 5974074983, 5991388693, 6011812975, 6034755007, 6058546815, 6084724655, 6113713455, 6147849583, 6177551815, 6191216311, 6209561471, 6223427063, 6242587575, 6260119383, 6280307175, 6304068279, 6327356735, 6353837551, 6382695527, 6416709103, 6444073407, 6450948303, 6462708815, 6476249263, 6482134351, 6494145695, 6507533543, 6516168535, 6530603229, 6544983631, 6556827815, 6572783015, 6584131023, 6600451231, 6616083807, 6632674511, 6650384031, 6672721631, 6691241423, 6711830847, 6717736155, 6729325853, 6741953215, 6749723215, 6761545831, 6772757991, 6783443303, 6796613279, 6812342607, 6822313167, 6837030303, 6850822351, 6866824511, 6883347631, 6899693215, 6917049629, 6935836319, 6955309519, 6979812783, 6996517047, 7017287783, 7035970647, 7059420647, 7085106095, 7114414911, 7147523247, 7180912463, 7218689695, 7252042919, 7270192311, 7288902759, 7315146927, 7336145239, 7360366055, 7388354463, 7421137103, 7455704399, 7499512127, 7520400067, 7528903847, 7538523599, 7551279831, 7558506407, 7570981287, 7584421799, 7593627823, 7607004831, 7621435687, 7634887639, 7651167407, 7663616477, 7682352831, 7694158575, 7713830591, 7730656671, 7752447439, 7771381087, 7787169367, 7794440655, 7805967407, 7818975567, 7825362255, 7837570647, 7852021095, 7860166351, 7873794647, 7888619287, 7902098007, 7918859311, 7928394191, 7945811199, 7959786703, 7977572559, 7994958239, 8019594911, 8036845727, 8057312295, 8075403479, 8094062055, 8120382823, 8141345207, 8165271015, 8193457007, 8226312559, 8260799663, 8304504559, 8328355503, 8355116887, 8370034407, 8392913959, 8422196903, 8442467927, 8472909119, 8506069151, 8543401567, 8588431039, 8593114763, 8596660699, 8601835951, 8607801947, 8613116335, 8620578551, 8625833527, 8629292591, 8633977355, 8640234735, 8645028923, 8651627103, 8659219547, 8664212855, 8672446831, 8680212179, 8690882359, 8695971183, 8703182871, 8711099999, 8720671679, 8727885023, 8733913327, 8743205051, 8752295007, 8760718175, 8766624475, 8775807059, 8784975547, 8795563887, 8806475823, 8819775359, 8830690415, 8842471007, 8857532287, 8861488731, 8865059019, 8870200983, 8876163707, 8881514571, 8888859255, 8894239063, 8897664919, 8902247087, 8908516463, 8913413943, 8919980731, 8927631967, 8932605743, 8940754223, 8948615343, 8959296779, 8964363287, 8971424047, 8979420631, 8988944991, 8996233327, 9002222831, 9011603423, 9020668511, 9029131931, 9035013487, 9044187519, 9053292927, 9063985327, 9074853359, 9088082031, 9099084399, 9110877279, 9125832815, 9132701663, 9142144763, 9154476407, 9164725819, 9173132471, 9183942519, 9198204055, 9212116351, 9229939031, 9242917871, 9261851503, 9274636027, 9295123423, 9307697851, 9329131375, 9351504223, 9376714431, 9397735287, 9404960239, 9416328119, 9429864855, 9436216167, 9447003063, 9461458679, 9471920055, 9489765751, 9503278615, 9519334071, 9535775575, 9552098015, 9568844671, 9585111519, 9605955439, 9634335855, 9661693375, 9666757643, 9670340843, 9675461815, 9681399487, 9686791607, 9694095991, 9699525083, 9702925943, 9707459759, 9713716975, 9718682039, 9725129915, 9732915063, 9737872539, 9745990831, 9753886939, 9764545335, 9769632439, 9776563695, 9784627607, 9794087647, 9801434999, 9807360367, 9816868603, 9825841855, 9834402331, 9840232635, 9849359071, 9858303455, 9869259183, 9880027999, 9893146463, 9904235375, 9916093759, 9930896735, 9935168879, 9938769207, 9943853551, 9949810111, 9955218507, 9962494203, 9967943895, 9971340567, 9975829359, 9982071487, 9987104971, 9993530939, 10001337687, 10006295391, 10014365111, 10022304175, 10032954223, 10038052311, 10044922719, 10053041271, 10062492087, 10069836015, 10075746043, 10085283739, 10094223099, 10102816991, 10108637851, 10117752143, 10126647007, 10137675951, 10148446639, 10161543903, 10172609391, 10184453567, 10199295711, 10206271727, 10215705207, 10228092727, 10238424471, 10246819311, 10257605819, 10271912887, 10285777335, 10303646583, 10316362167, 10335467375, 10348206779, 10368805567, 10381369199, 10402726575, 10425155007, 10450380143, 10471454315, 10478637367, 10490040439, 10503563119, 10509927447, 10520692407, 10535095743, 10545595831, 10563413751, 10576990551, 10593036215, 10609496283, 10625619575, 10642450671, 10658717435, 10679454703, 10707915487, 10735163135, 10740827095, 10744643131, 10753445807, 10759189243, 10769072363, 10774052543, 10777887387, 10786187483, 10792341643, 10801398711, 10808952795, 10817425879, 10827143007, 10839528791, 10845219679, 10856708831, 10867536823, 10876116143, 10884810671, 10894874991, 10907392603, 10912932207, 10924697787, 10938242527, 10947237807, 10962735583, 10977600623, 10992292207, 11006869183, 11010688863, 11015719151, 11024325983, 11029810747, 11040105115, 11044021463, 11048489455, 11057383095, 11062939851, 11073795019, 11079561783, 11090537311, 11100281567, 11110263663, 11117863343, 11128123967, 11140829851, 11146753887, 11157822143, 11168931295, 11178062491, 11186701499, 11196804527, 11210107823, 11224007007, 11241067467, 11250739951, 11266223839, 11278892911, 11291444947, 11308155019, 11314995055, 11329204763, 11345790903, 11363727223, 11381556695, 11403609847, 11421129915, 11444435311, 11461999999, 11487524335, 11517630191, 11545166647, 11554429167, 11568597951, 11581090495, 11593868955, 11610939607, 11626710199, 11646751031, 11664210815, 11683307375, 11706434495, 11723333103, 11748308143, 11780128239, 11811366635, 11815368235, 11818982511, 11828229239, 11833844447, 11844755035, 11848403295, 11852223319, 11861541815, 11866896247, 11877224919, 11883357467, 11893232087, 11901932767, 11914194607, 11919934303, 11931408223, 11944099551, 11950428827, 11960653019, 11969517279, 11981694319, 11988200159, 12000000863, 12013288623, 12023839663, 12040114607, 12052748655, 12067877787, 12081271919, 12085069783, 12090914011, 12098830647, 12104654527, 12114478167, 12118305339, 12123894519, 12132143827, 12137569455, 12148549487, 12154097751, 12165661111, 12176894687, 12184802231, 12193700271, 12203369867, 12215694831, 12221111999, 12233040095, 12245745339, 12252387759, 12262577371, 12271432443, 12285372255, 12299553503, 12316055407, 12327536575, 12344383199, 12353777391, 12367143483, 12382933463, 12390240491, 12404920923, 12421001951, 12440366527, 12457160431, 12482549467, 12499091135, 12520071259, 12538978043, 12567306975, 12598050223, 12619992175, 12631240887, 12647337407, 12656344767, 12669348543, 12686046935, 12702857079, 12721915823, 12740481719, 12758506991, 12784611759, 12801250427, 12824422767, 12856602351, 12885761199, 12891440823, 12900706263, 12909139895, 12919772119, 12925831063, 12935431511, 12943924959, 12954906031, 12964597015, 12975152407, 12987786583, 12996853167, 13007968607, 13021337439, 13032825711, 13048756399, 13059524299, 13073922479, 13090301807, 13105604447, 13124181871, 13140309727, 13155077999, 13161563823, 13170685791, 13179646327, 13189291951, 13195686583, 13204961519, 13214637175, 13224973607, 13234423735, 13246202719, 13258270895, 13267458911, 13279216055, 13291950679, 13304598647, 13321204759, 13330298543, 13344408751, 13360211311, 13377084783, 13394327919, 13411513823, 13427303895, 13443467967, 13460338231, 13476372279, 13494250367, 13516172735, 13535146743, 13559358823, 13587762623, 13610968767, 13642930111, 13677630687, 13697161079, 13714347959, 13730033391, 13746290047, 13764662999, 13790176503, 13806405487, 13829664447, 13859001199, 13883614911, 13916149631, 13950541503, 13963310039, 13971266479, 13979947013, 13991615799, 13997338303, 14005368543, 14014158711, 14026082391, 14034019823, 14044933983, 14059375023, 14066734647, 14077726047, 14091820055, 14101522095, 14115226743, 14130652875, 14143230687, 14159412607, 14173098847, 14193654623, 14207158127, 14227285335, 14232601943, 14240941239, 14249518199, 14261137751, 14266707311, 14275454647, 14284035291, 14295568631, 14303955223, 14315643191, 14328801879, 14336982751, 14348826671, 14361994415, 14372452207, 14386857663, 14400020159, 14413354719, 14429672911, 14445299039, 14463799151, 14479238447, 14497321839, 14511036351, 14530310519, 14543101495, 14563662783, 14580782007, 14601693303, 14623901559, 14648012159, 14674185919, 14703451247, 14737323695, 14767523191, 14781785463, 14800010479, 14814472895, 14833499375, 14852363447, 14872077527, 14898196567, 14920205431, 14946671983, 14976327407, 15010985855, 15035041071, 15043372983, 15054647639, 15067613359, 15074931631, 15087254959, 15100872407, 15112391855, 15127164391, 15139129695, 15154131159, 15169564079, 15184622303, 15202387631, 15217502559, 15235983279, 15255085487, 15274429791, 15300039919, 15306397271, 15318328159, 15330612663, 15339257535, 15351175519, 15360868791, 15373301623, 15387424607, 15403027823, 15414671791, 15430280695, 15442794463, 15460508079, 15475386287, 15492413279, 15511138223, 15536232623, 15553870191, 15573782871, 15592756599, 15611412919, 15637076927, 15658517367, 15683622839, 15711020783, 15743686063, 15779192239, 15822290303, 15845736175, 15871585135, 15888205175, 15909509487, 15938704599, 15959831415, 15990853311, 16023327455, 16061328767, 16106282687, 16112053631, 16124110199, 16137007607, 16144934359, 16156757167, 16167681471, 16179019119, 16194045791, 16208940207, 16220919287, 16237027039, 16249136879, 16267487999, 16281556335, 16299279807, 16318048175, 16342001071, 16360472415, 16377175743, 16385443767, 16396795375, 16409758639, 16417065391, 16429418195, 16443030895, 16454542807, 16469255607, 16481275743, 16496291167, 16511700655, 16526725855, 16544526175, 16559646559, 16578092975, 16597228383, 16616562095, 16641816287, 16657008879, 16679151287, 16697762679, 16718717367, 16747413231, 16774465015, 16805639935, 16836553663, 16879189359, 16913806679, 16932441791, 16950709951, 16974702327, 16996670143, 17019778775, 17050125151, 17083441007, 17117079919, 17155431407, 17183384791, 17191600623, 17201135799, 17212052351, 17219881007, 17230632055, 17239426495, 17251517407, 17264801663, 17279116799, 17291231551, 17305190655, 17320580955, 17336994911, 17353729151, 17370687743, 17390043519, 17415250255, 17437326463, 17452449887, 17460899455, 17469798655, 17481255423, 17488510719, 17499412607, 17508687999, 17520334719, 17533830231, 17548723327, 17560445439, 17574418207, 17589499007, 17606033535, 17622683743, 17639687039, 17659823103, 17684552831, 17706699263, 17727659007, 17747965695, 17767534207, 17788129559, 17817694071, 17845173247, 17880362747, 17916163583, 17966786047, 17995759479, 18015592831, 18035789975, 18055828863, 18085840735, 18112875519, 18147389183, 18183321343, 18233456383, 18257728895, 18266201123, 18275091807, 18286523263, 18293806655, 18304702239, 18313970047, 18325608411, 18339115391, 18353968639, 18365674239, 18379716863, 18394780415, 18411319551, 18427977839, 18444978139, 18465022719, 18489840511, 18511959519, 18526356319, 18534909021, 18543843999, 18555679991, 18562474239, 18573531103, 18583138551, 18594512351, 18608158431, 18622935391, 18635139839, 18649014495, 18663844223, 18680398719, 18696950491, 18714050943, 18734944735, 18759143807, 18781379967, 18803081079, 18822682495, 18842124511, 18862710655, 18892461535, 18920887743, 18956362239, 18992083839, 19043190367, 19070549119, 19090627327, 19110110207, 19130564887, 19160204991, 19188361087, 19223546623, 19259368959, 19310623487, 19331921223, 19344631031, 19355342591, 19366585055, 19380056791, 19394496735, 19408459207, 19426972127, 19443013343, 19462150783, 19480343935, 19499615071, 19518882015, 19546142591, 19571790591, 19597791615, 19606742255, 19618674559, 19631948895, 19644032199, 19654202751, 19669328215, 19686110039, 19703017711, 19720429951, 19739019263, 19762034431, 19781469567, 19802651007, 19832139263, 19859804927, 19884194559, 19906333887, 19933807455, 19969118303, 20005201663, 20050232063, 20104349055, 20143816443, 20168757951, 20190642399, 20223941375, 20260051967, 20303756031, 20353209727, 20402508271, 20411450879, 20423403903, 20437062111, 20448091807, 20458927839, 20474110847, 20490791295, 20508020223, 20525201791, 20543377791, 20565706239, 20586171615, 20607169919, 20636593535, 20662813439, 20675826231, 20688650335, 20701903615, 20710200863, 20724133471, 20738599295, 20754320319, 20771909119, 20788643199, 20806829407, 20825353087, 20844331391, 20866618879, 20892406879, 20921972607, 20945646303, 20972673791, 20994659895, 21026981759, 21061973727, 21106231039, 21152320511, 21208732791, 21230302943, 21257230071, 21282666495, 21320094655, 21359798783, 21400540671, 21462074239, 21483512543, 21497975895, 21513581439, 21529663039, 21546490815, 21563991391, 21583005135, 21604177887, 21627676031, 21652578687, 21680999039, 21713000287, 21743985023, 21757071599, 21772703799, 21786331247, 21802451647, 21819577631, 21839312255, 21858110847, 21879409279, 21903514239, 21929914751, 21958867711, 21991275903, 22022655231, 22051931231, 22084147319, 22122099583, 22168126207, 22225557503, 22284697695, 22315028343, 22346409855, 22382985079, 22424463103, 22479386367, 22548273151, 22560351999, 22574601919, 22589511151, 22605321567, 22622348895, 22641135903, 22660343167, 22682874965, 22705188223, 22732484351, 22759380223, 22791273983, 22819476975, 22834112095, 22849804255, 22863583679, 22880256863, 22897066223, 22917584895, 22935545567, 22956597631, 22983247615, 23007577471, 23038125439, 23070578047, 23102687167, 23132346111, 23165477247, 23204009951, 23253288543, 23309544447, 23362852607, 23392942847, 23425337151, 23462188511, 23508461311, 23562835839, 23623542495, 23640832767, 23660123743, 23678124767, 23699969759, 23725223935, 23748940223, 23778521471, 23810585983, 23845621247, 23886436351, 23905259263, 23925016959, 23943101183, 23963162079, 23988344063, 24012477023, 24041937663, 24071471583, 24105905151, 24144835967, 24181755647, 24220272063, 24265996159, 24325822463, 24398022527, 24449464191, 24486560191, 24533309119, 24589752319, 24663840127, 24702766975, 24722030847, 24742283711, 24763727999, 24784785885, 24809800639, 24835694815, 24867380991, 24899812735, 24936686943, 24968909407, 24986306239, 25004514495, 25025193471, 25048996799, 25071136255, 25099568479, 25128967167, 25158891007, 25198970623, 25237106431, 25272800863, 25317131615, 25363391999, 25426367999, 25503781983, 25540246271, 25583406591, 25628325631, 25692226943, 25770132663, 25777154383, 25788476799, 25798117631, 25807864031, 25817826047, 25826799735, 25839332223, 25853006319, 25867690463, 25879960319, 25894291231, 25910196991, 25927131903, 25943986047, 25960935511, 25981703551, 26007068927, 26029354367, 26043036499, 26053256951, 26062094559, 26073965671, 26081608159, 26092342143, 26103644919, 26115256831, 26129453503, 26144101311, 26158416063, 26174241535, 26190442751, 26208133247, 26224334207, 26242903551, 26265852287, 26290616191, 26312123775, 26331066847, 26351210743, 26372030911, 26398757631, 26428669055, 26462064127, 26496771455, 26544701695, 26581471799, 26600483967, 26621313143, 26641684223, 26668781431, 26698138847, 26731625215, 26766337119, 26814596095, 26846499711, 26855229951, 26865186143, 26877302903, 26884229823, 26895394015, 26904988607, 26917175663, 26931728791, 26946656543, 26960542079, 26975352319, 26990681295, 27009010431, 27024694143, 27043079935, 27065309055, 27088368127, 27112444055, 27119609567, 27130951935, 27140885887, 27150176287, 27160355575, 27169183451, 27181757403, 27195938367, 27210666719, 27222868351, 27236861663, 27252734335, 27269696639, 27286470895, 27303525503, 27324918655, 27349818751, 27372393215, 27394351871, 27414332087, 27433227927, 27454675839, 27484933119, 27515159263, 27550193407, 27586270815, 27637376383, 27663930615, 27683497695, 27702420191, 27724379007, 27754137023, 27784995711, 27819697919, 27856528767, 27907381119, 27923765631, 27937039455, 27951235439, 27959394735, 27972796799, 27987906927, 28005158271, 28022474847, 28039657435, 28058170079, 28079618815, 28101075711, 28122613119, 28152818047, 28179176191, 28192281271, 28205642111, 28219745015, 28228026551, 28241402239, 28256617855, 28273854047, 28291012503, 28308297151, 28326805087, 28348737023, 28370139903, 28391349727, 28421653375, 28448445183, 28473537783, 28495429855, 28523434847, 28558240511, 28594632447, 28639414015, 28693179391, 28733081271, 28758509407, 28780109375, 28813132127, 28848491263, 28892879615, 28942084863, 28992452831, 29002012911, 29014361143, 29027841759, 29040487423, 29050811871, 29065867999, 29084647903, 29101453791, 29121139935, 29142005247, 29161717983, 29180798939, 29207301343, 29233701759, 29261072255, 29270806175, 29282878687, 29296440391, 29309362943, 29319717631, 29334651775, 29353841375, 29370618287, 29390013887, 29410670555, 29430384347, 29449530239, 29476527327, 29502527871, 29532116191, 29555241207, 29580613271, 29611093503, };
int main(){
	int t;
	int k;
	scanf("%d", &t);
	int i, j;
	for(i=1; i<=K; i++){
		for(j=1; j<=K; j++)
			g[i][j] = gcd(i, j);
	}
	while(t--){
		scanf("%d", &k);
		int cur = k/gap*gap - 1;
		ll i;
		for(i = crit[k/gap]; ; i++){
			if(good(i)){
				cur++;
				if(cur == k)
					break;
			}
		}
		printset(i);
	}
	return 0;
}

Compilation message

Main.cpp: In function 'void printset(ll)':
Main.cpp:31:11: warning: format '%d' expects argument of type 'int', but argument 2 has type 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wformat=]
   31 |  printf("%d ", ans.size());
      |          ~^    ~~~~~~~~~~
      |           |            |
      |           int          std::vector<int>::size_type {aka long unsigned int}
      |          %ld
Main.cpp: In function 'int main()':
Main.cpp:41:7: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   41 |  scanf("%d", &t);
      |  ~~~~~^~~~~~~~~~
Main.cpp:48:8: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   48 |   scanf("%d", &k);
      |   ~~~~~^~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 452 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 344 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 452 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 344 KB Output is correct
7 Correct 891 ms 348 KB Output is correct
8 Correct 744 ms 348 KB Output is correct
9 Correct 997 ms 432 KB Output is correct
10 Correct 1066 ms 436 KB Output is correct
11 Correct 550 ms 348 KB Output is correct
12 Correct 1126 ms 604 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 452 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 344 KB Output is correct
7 Correct 891 ms 348 KB Output is correct
8 Correct 744 ms 348 KB Output is correct
9 Correct 997 ms 432 KB Output is correct
10 Correct 1066 ms 436 KB Output is correct
11 Correct 550 ms 348 KB Output is correct
12 Correct 1126 ms 604 KB Output is correct
13 Correct 1440 ms 436 KB Output is correct
14 Correct 3307 ms 432 KB Output is correct
15 Correct 1628 ms 344 KB Output is correct
16 Incorrect 3488 ms 348 KB Output isn't correct
17 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 452 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 344 KB Output is correct
7 Correct 891 ms 348 KB Output is correct
8 Correct 744 ms 348 KB Output is correct
9 Correct 997 ms 432 KB Output is correct
10 Correct 1066 ms 436 KB Output is correct
11 Correct 550 ms 348 KB Output is correct
12 Correct 1126 ms 604 KB Output is correct
13 Correct 1440 ms 436 KB Output is correct
14 Correct 3307 ms 432 KB Output is correct
15 Correct 1628 ms 344 KB Output is correct
16 Incorrect 3488 ms 348 KB Output isn't correct
17 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 344 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 452 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 344 KB Output is correct
7 Correct 891 ms 348 KB Output is correct
8 Correct 744 ms 348 KB Output is correct
9 Correct 997 ms 432 KB Output is correct
10 Correct 1066 ms 436 KB Output is correct
11 Correct 550 ms 348 KB Output is correct
12 Correct 1126 ms 604 KB Output is correct
13 Correct 1440 ms 436 KB Output is correct
14 Correct 3307 ms 432 KB Output is correct
15 Correct 1628 ms 344 KB Output is correct
16 Incorrect 3488 ms 348 KB Output isn't correct
17 Halted 0 ms 0 KB -