QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#555909#7281. How to Avoid Disqualification in 75 Easy Stepsuser1008618 2ms3840kbC++1717.6kb2024-09-10 12:17:402024-09-10 12:17:40

Judging History

你现在查看的是最新测评结果

  • [2024-09-10 12:17:40]
  • 评测
  • 测评结果:18
  • 用时:2ms
  • 内存:3840kb
  • [2024-09-10 12:17:40]
  • 提交

answer

#include <bits/stdc++.h>
#include "avoid.h"

using namespace std;

const int N = 1000, MAX = 52;

#define int unsigned long long

//int R[N];
//mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
//
//bool check()
//{
//	unordered_set<int> all;
//	for (int i = 0; i < N; i++)
//		for (int j = i; j < N; j++)
//		{
//			int val = R[i] | R[j];
//			if (all.find(val) != all.end()) return false;
//			all.insert(val);
//		}
//	return true;
//}
//
//int rnd()
//{
//	return rng() % 100 <= 30;
//}

//signed main()
//{
//	int rd = 0;
//	while (1)
//	{
//		rd++;
//		cerr << rd << endl;
//		for (int i = 0; i < N; i++) R[i] = 0;
//		for (int i = 0; i < N; i++)
//			for (int j = 0; j < MAX; j++)
//				R[i] |= (rnd() << j);
//		if (check())
//		{
//			for (int i = 0; i < N; i++) cout << R[i] << ',';
//			cout << endl << rd << ' ' << clock() << endl; 
//			return 0;
//		}
//	}
//}

vector<int> ret;

void query(const vector<int>& v)
{
	vector<signed> q;
	for (int x : v) q.push_back(x);
	send(q);
}

int R[N] = {2427778851983890,1347755136,344972666667076,261792754827264,1975618863776416,45664670946314,2552843915493456,1717463603566769,2832341955344546,1126039539747360,2471920042512411,203547580110924,1707769057520788,1207988342312098,569564480146480,642474661942285,3828499623211610,106112939511974,967722318827185,2272312918804361,538504388162822,1198467675996675,1044588198384803,3299517432152,2525648044722889,609000249963009,2678489951871426,1954949029712024,286300375105820,290298997510676,1245197234226186,297483614036160,108964394566946,86998857634068,1200667293518176,52847978752321,643094324463488,1979671732139520,2463561033205765,3812007405171110,2252373201334444,2603929150064736,71490986918948,703731602030669,1232005626889478,100756121405570,3402718530146313,286726187319605,180492244955656,2402086930625088,519386328731872,1526577439969712,92359588053122,502205427499096,3476847048294720,431042931549058,3078727183007880,1553140943040817,2257334191696897,2826294673408048,2819240964989128,1629623823766610,992365566361648,2289575193886817,2696211420723265,3386746465884288,2464470518874512,2641621990007745,53206344694017,2338664736424068,1329079241359616,1343639767744711,1141035642807840,586866008039433,2489582625247345,2310095942197568,1706443206742031,2344259992421904,229610035908954,791951765405714,570923175585952,10208881806498,2603690947036806,1178315972518024,562969640469760,3186116525044786,1688856303538432,283828642546432,1108321788453,3132543193629688,2504146403732757,3562460844174720,1575531477112985,2857684543018344,851370638885961,2419729181214980,3387706432635936,217205121292992,845689798656709,2025098557058836,6751705464929,1413012567654701,446842280977,2818053234795805,135259727365120,495476424589450,422607648329862,22544385053072,1695714530128096,3397236790421146,3773638746604818,1337319813751320,1927206773338497,704164294895649,787353367693447,74133938710,2854420906934616,567399915106498,722664758198552,1834102735908946,72706906335256,1548259898163746,1841201512861511,2647740006809896,2269873119166470,2373989354178089,768010528788528,859560567376136,3994141495801038,170622995029505,2395995358895277,75937363592256,72912456582156,625904248369215,298597300444250,149688218189851,3536322682585671,2304723006264665,1282039425084420,1147349245783056,2820801982108802,2357497683796032,167160932470036,179000280483616,2305909676450444,781891549015648,20894219026535,678399010441056,3521014458057874,1762109337719826,211321518137510,1281242448840869,2331261086645440,1278873555701585,2612096055443712,2433254477143328,2270295335452823,588518451183717,188159094737220,2234236618778433,2925286556696820,2280474735413285,2551023791505895,1062337613292144,677456049905984,237787410695426,68186942246018,1268845763412484,2401609120392781,1419469580043399,326007882285125,2054575394419840,3031457209682963,9029272789506,881724574355969,3799925070692432,574495909759989,507976561680897,317346577203330,1550406016618682,862062501503128,141933461110864,1779015579075812,15720120262717,3316781843613448,1131408338879360,211452536121408,356414644030986,2837738741057569,4012809419626686,303465547776704,2050060451842564,3061504275294228,633387599831081,2308105920578054,627316581493794,1241143597131904,1276143376802576,708377581719632,287118669650368,664536693416978,647631190176076,2697454988215360,1569485341392899,1977132360147485,2377556623956272,2475144458648,1899957540637770,2577427482292244,1891469644430624,986953752249986,352943341609145,844461573562426,554163020775220,17738827336261,160546062403496,1346919193105048,2868172756165925,2295963626506785,746030014665016,105241389120,440629292213248,266441075092,1559221311775719,141905932661345,3940780035023917,2399224571405096,220645707319637,751563073196544,1451425225917376,1016465398566208,563775746118336,1343672615863984,736450688088418,27525642458609,3542644290834076,2392607752982913,1596490890348704,1786309128491460,562995397799944,920344810542280,2608199455145995,3414332574683840,3192985258132502,1477782296528640,1408886913570160,3114426078601232,3382997865614983,282780828517188,726230796124800,22335375870144,146056167491,1696359887421568,222172216164898,3615473439745441,141188522448960,1376696438528,375930971684929,2427997095067929,256994135771440,738872787288104,441312188895600,2404920918042644,2610526498103425,422257059471392,5570036253261,4226544782344193,35802884092450,1173470968939017,158607148847382,2715920156656682,1201115543830850,3659383339427073,2469678271244288,4049025700474032,39688022917984,2331115012794625,1724652738969608,281750611367040,3870626676908304,3962930432725121,203483241343509,2262090625664568,1847832369731590,565157566661712,953826476097635,162736857416192,3141880555213514,1566812665825413,287097911828770,2336481814251720,404911998357532,844567094182784,31061288517732,3914333811230416,22057950316592,216907746586,190817897612086,1277404055602560,1698202168595568,15633718829880,168829361947692,871500673057440,2251804327151720,568862043045888,985597859661161,675514880688454,2463635877148754,2940516157260106,2326947705129388,353158522359968,183777363058209,376627832628610,1692447969657856,3066224949072970,2556093473550914,1451363972186250,3983656002575368,1726370816499875,1134988679582978,1705360361682145,1128533548597418,3668666870944064,1761213013491744,3401073790329808,2261310750623841,884306995057448,422264600879554,70508130576387,317936259567916,149106586290212,163165815392550,1216198664257601,37933189529250,645229581893764,3397289090687072,72022465940016,935762151604736,215792185773603,1180052230244882,3417282158089362,94776577974546,176302233486656,5571940100044,1744243751551626,1888353242976432,344672175504,502507055383264,1425680039462055,3385426871457824,3114093962091521,1178970696589412,2270508746114777,2279868230504600,1584482272712840,792757010450770,91990683289601,1126179501609873,1550057996818752,141459059644420,2417853050200352,598512332976192,335662530331772,51276701895136,261718127496081,594595278562624,2281559718250690,1410424481026703,175957414053964,2593182852919505,2324814341771584,156681791276084,2603661488435532,567446920447232,306252862392916,563061675526659,18045887222528,1130916573887136,3626221023952904,1244106265662022,570134935507734,130910947154500,748226479194113,2368009306062982,2842382035222600,1998093948978352,903066670005249,2405742587685132,1839809456902160,3382819733145162,24337505779844,74877965731990,2486555211600155,2260690591073456,61648419700775,621508611932162,1147909064134729,2569352784643072,149671325066883,1983831720861750,1451475607750848,1244658105979420,1266758009110784,189219383652384,881010541598768,2604811836994134,1407512435892272,704839977797682,1074782615778317,1196861893394530,2051691113419104,259522405118492,185836459123010,718105798011008,88068743422224,2260751364804616,527817322948674,2568462522754768,2394272496361920,2824423144482946,2288633525439819,2471840883032200,601980403985,159230293304646,15068906887220,1206502127897609,1408007015803402,33886793171120,2378317068011032,36971569701190,1267051880606793,3134353318682627,732345012781184,212240643933184,2329867370841744,1742324931612804,2947309877466246,563121785942037,2821420816269330,309134805205158,567898179512389,456596015548503,222101992383648,23527914827792,1346077209514034,1166041234673666,1583863847459104,1331923114805141,1829914430951598,1135829976901098,2853019572710657,1163903942262787,2706982264641280,23648627861602,4226591509513480,352427992302594,1269624552440928,4088579494052389,35872106255110,326236071176202,1477817181702488,353673378251790,1829658971819023,1734145739707444,677582928677393,245196078007570,4008022856162,282890187083904,3660414357348387,217752965098416,350487140376580,2605040160379284,149810003869889,1478311006479628,3391053654851604,1464886404129,57743495516746,299230425002740,1249883281426699,2397348748174384,1899983744271424,319996674297860,3386587695036480,229591772711460,317317753900070,27781161830944,3476245798993920,36297063081232,44141828476438,113528391407890,3950624546779168,1731363972062802,1288838333142304,70510573800464,2819363703419270,599320203104268,1602306269380654,293606659719666,2117256914048585,281961920252954,1496092332165242,211141439802116,2678415781004809,2357366910396777,2447842829017601,2256210213036544,21999359366153,2014584743424704,1972532670694408,2251836260287044,546569687425130,37409436732490,3681222133302289,3561662297164570,4976256750858,1178887052877824,2322325341799537,53123783852077,3973943730635812,942625353917465,106936164961682,1280402980198052,18195361826864,1219664831056022,854417243187394,287081588858952,1768706241890333,2272725978080560,2287917267666072,3950899759347773,2851105902125057,1555053942217248,1279832659403140,88270465992997,2728176705538,3338933640767746,651325114570820,2428357332279376,2550911272616009,1280467517902808,1127343357796420,642562140422419,3149097260321592,3947483120801984,661971506598920,3668740881778785,300192463335493,1864791388368384,4257608732839976,2927699492998151,2287570503683088,295807953687606,3940929002040336,3733941617164291,86380550490834,1187556317724944,2335736628596750,281851978080260,2278193463825158,2266098908004480,88112327822544,343554706952273,8832725222928,1695945280547731,440910633287820,3448070622610226,2302411850940625,140884065173828,2117764006342617,916310548826132,1600924169872883,1129570650562630,744882654304270,1348278423973890,2608153687040778,338704915366167,4314948578971809,778871004759201,193750591361733,2265700693443178,2468420784294148,1168369936459876,1198791473611604,510539012776290,3694362025544857,1302406168060256,3616405412995200,319442504407125,2834560596971176,193533525541386,1275436061554196,2291812804905110,4415495904097,321362476665218,4480189383302,849240031035532,3387115006148611,1137534415880205,607136581178545,582231169476144,79245735723232,1321614688566084,2005588934656216,3082473755050260,335686148659264,33419947182248,2187007338545226,71247846179600,2322769991905424,302709458667632,1553748749127744,2599797816058080,633399438160900,3106671464564901,163289314137196,145157883496798,3600423114250280,281479473030152,4450666655793,3659824730014726,246430191092912,532921058402629,1161257757704528,44603313360134,77487316929604,3677866618990856,1726284816205976,3039125342257160,1267784755552514,3096230136349489,616006389152773,573446853885952,528317233398080,3451753698700108,187904970557960,282866698262676,1689408890372531,142420579721953,74784643816448,2973099586576384,627000961146962,453010119739412,1132525497877536,301817795772428,2603981059019305,2333397364004544,1198608892608513,1443755649436620,3527923801837656,1137037613601408,774400953030597,1056133288673352,567383036117762,2911043072430253,90444114433582,2452220236136706,1127001703916438,6135498280384,37384389548290,1135802499204100,283949146735648,739359763774757,1706942176952537,462894403688586,1170782316102160,459945914943747,36014385008770,2427800867321616,39170877768744,35273715093635,832421846139817,2196311793532946,1265546513416200,568935550312897,1750533121449176,317760137484162,35204911595554,3380190888901632,2754323369214089,156146267789413,1280433277232418,133457855547392,813922241393920,250711341549664,3550121920859140,141076780829696,2869770985669128,71206332256884,1693257128340160,777356047534594,1136485048864913,1488463877236188,3079336934703246,94560883487194,4012947216058916,3387359416557600,24465229874068,79182656111169,1693385382610097,1729673866283013,2473905525866560,2174304012075521,154832162798273,603020307273232,1302105512087680,1702598927286801,1165643191765316,704106170250400,712573882884362,2533309310262400,2324378320512266,568526180189184,2175390283190288,1215650237539584,1136077883480135,289219071716381,8907260480,1738348469689756,70949908392264,2322475185993736,585250514700289,1238092107913,3389249743781908,97052437644783,5622215803208,1136999713869241,2816579960203265,422356626581012,71202178662413,642329002393632,3505269277466498,1590207390588966,3724610513895432,775997714595905,756758508732416,283677569591721,211107643962961,322204271253777,845192790581728,2306792868991161,3202298960413258,1212374917844000,3826446630117704,1412926150068767,2137605677253317,2779784555923544,92436324624448,108974062732356,783746175471424,163355480619033,224096096913694,1224313722177540,2832516201318873,706060478912676,459779640247296,268281378442286,3136222164158736,2254593926897296,2569146359484128,38800979666944,1441741774303537,281587217080357,2498111433015316,3382682419498753,1167754376855853,2604281706250368,11614067623544,741071978107652,1378936379146557,2819912456811209,236670735810560,4125389374907408,3134089750827556,317760681378216,23008139891204,2252910709705913,2421042214609104,1734483988709792,2399325246526465,1707552044288096,591009584063032,1175927754164763,1137395186744,41026711130625,6951421534469,1131192458289312,288898295436200,617239546738756,1407376897672468,68310454902852,1296339411435656,1127366910815248,595026583920648,1693801777471682,158899362994288,845121922907144,1891585629704260,144073204066432,420014557180740,3941485349732882,228767245796536,4257928674381856,115037127622800,79234374571293,687645960729737,1841274089932419,475581739180099,845848729861186,567485590033467,1169927896564962,774136488285260,3311420498716,1125939501187910,7168636007962,854458180961873,2522157424527618,859037635658,106684212298572,7301469577295,292478752157749,3597624880992471,3417363748235074,2999543285839125,9475784245454,599652869738962,2410406256769109,158959038766726,1688889878201384,519971306313824,3249074512060770,25739749045536,2313476699587629,246448209793036,844450768171844,1264485788885810,217890264948847,565888495518132,163865889550552,764474322035875,45669051665064,567625260542737,3419623500558921,1623128640850344,3643151294724,1734206882778652,1235391555119394,3137252450935142,413660618756,26675662823748,3519057915596258,46607926427688,635531545423406,321650237644816,2675123610573392,651810700795904,1585710719677176,3166628118569474,289517773132,2517954643365260,352535278061068,1249603687784770,73208960782896,957007331395202,176368547963909,2888176662356512,453574639488646,63962142691408,2414823084659076,3943278362968069,141293776372904,2621238481379336,2842255752829600,2675816391774420,328085094318249,321127122043683,1106109171516966,1442582877970737,882793301363072,1277684598263809,48378580305740,74313815351297,890252499813697,1726095818765513,492598727020854,1239899449606901,1477195285129097,3383240500971168,549910433005920,143078909806339,1759261558884051,1144262577095250,1423909467811968,1128159094767668,88151093741952,2269460725628984,353089296400454,614428795281482,37384513314818,317283260816129,1487296977189188,2885573892442191,10075494428274,1164612368597754,9137725638720,2434907288940673,425837419765873,2607086103730186,31989104177193,1573010333069338,1462917577871451,851092437095967,222103499559432,3538508211995365,712840315535379,189430740549698,4082650089497895,959684677248300,2401926235884677,1203630664866313,3522605510608505,176062529142988,1199846443198660,1132840842609440,58449679387669,435497672033296,1268908638100105,2421133768975218,477472995999751,2305268433158732,140751867812096,222926544832576,3036179729489961,123841426816833,875775515492673,88794166462086,156215781205688,2832342498836864,2304929366032652,282073269809513,2341788371520117,422607719698448,716607085371520,1747880629706827,2814749807247441,1407925748908106,1419471667725864,2351076989993988,1559014615351320,707321151914165,1303593714059336,2388216600069248,26691522134189,476534138743370,43156911425669,49478040289537,3819914721458884,565561399094566,566286707067661,1781896170176513,2401973365117059,282162858353936,2850147012718666,248631992140417,633940596728329,568447616551048,3166875076814336,320236054386732,1128380527839945,290273229990408,3322935667069520,564277322719747,1032791459366592,423407675525434,4134870305053377,3448071351174013,4409059949220100,508869806018389,774973770040386,1829743082224320,2265650093376289,1415775922440739,4371812859790628,9183720968385,3201874770018397,3417300947665257,1168437490630801,908472824957956,2765087069914242,3123520551456787,470595540171153,706479713157637,75116836463010,4367296713983616,304015691227792,1142426951061008,917002063610639,64734876734796,3816181669842176,216432175485056,2253802569793};

pair<signed, signed> scout(signed _, signed __)
{
	assert(_ == 75 && __ == 1);

	int mx = 0;
	for (int i = 0; i < N; i++)
		for (int j = 0; j < 64; j++)
			if (R[i] >> j & 1) mx = max(mx, j);
	mx++;
	for (int i = 0; i < mx; i++)
	{
		vector<int> ask;
		for (int j = 0; j < N; j++)
			if (R[j] >> i & 1) ask.push_back(j + 1);
		query(ask);
	}
	auto res = wait();
	int x = 0;
	for (int i = 0; i < mx; i++) x |= ((int)res[i] << i);
	for (int i = 0; i < N; i++)
		for (int j = i; j < N; j++)
			if (x == (R[i] | R[j])) return {i + 1, j + 1};
	assert(0);
}

詳細信息

Subtask #1:

score: 0
Runtime Error

Test #1:

score: 0
Runtime Error

input:



output:


result:


Subtask #2:

score: 0
Runtime Error

Test #11:

score: 0
Runtime Error

input:

\x14

output:


result:


Subtask #3:

score: 0
Runtime Error

Test #66:

score: 0
Runtime Error

input:

\x1e

output:


result:


Subtask #4:

score: 18
Acceptable Answer

Test #120:

score: 18
Acceptable Answer
time: 2ms
memory: 3600kb

input:

K

output:


result:

points 0.23999999460 points  0.23999999460 Correct: 52 robot(s) used, 1 hour(s) passed

Test #121:

score: 18
Acceptable Answer
time: 1ms
memory: 3612kb

input:

K

output:


result:

points 0.23999999460 points  0.23999999460 Correct: 52 robot(s) used, 1 hour(s) passed

Test #122:

score: 18
Acceptable Answer
time: 1ms
memory: 3608kb

input:

K

output:


result:

points 0.23999999460 points  0.23999999460 Correct: 52 robot(s) used, 1 hour(s) passed

Test #123:

score: 18
Acceptable Answer
time: 1ms
memory: 3592kb

input:

K

output:


result:

points 0.23999999460 points  0.23999999460 Correct: 52 robot(s) used, 1 hour(s) passed

Test #124:

score: 18
Acceptable Answer
time: 1ms
memory: 3840kb

input:

K

output:


result:

points 0.23999999460 points  0.23999999460 Correct: 52 robot(s) used, 1 hour(s) passed

Test #125:

score: 18
Acceptable Answer
time: 1ms
memory: 3752kb

input:

K

output:


result:

points 0.23999999460 points  0.23999999460 Correct: 52 robot(s) used, 1 hour(s) passed

Test #126:

score: 18
Acceptable Answer
time: 1ms
memory: 3784kb

input:

K

output:


result:

points 0.23999999460 points  0.23999999460 Correct: 52 robot(s) used, 1 hour(s) passed

Test #127:

score: 18
Acceptable Answer
time: 2ms
memory: 3780kb

input:

K

output:


result:

points 0.23999999460 points  0.23999999460 Correct: 52 robot(s) used, 1 hour(s) passed

Test #128:

score: 18
Acceptable Answer
time: 2ms
memory: 3812kb

input:

K

output:


result:

points 0.23999999460 points  0.23999999460 Correct: 52 robot(s) used, 1 hour(s) passed

Test #129:

score: 18
Acceptable Answer
time: 2ms
memory: 3596kb

input:

K

output:


result:

points 0.23999999460 points  0.23999999460 Correct: 52 robot(s) used, 1 hour(s) passed

Test #130:

score: 18
Acceptable Answer
time: 2ms
memory: 3592kb

input:

K

output:


result:

points 0.23999999460 points  0.23999999460 Correct: 52 robot(s) used, 1 hour(s) passed

Test #131:

score: 18
Acceptable Answer
time: 0ms
memory: 3588kb

input:

K

output:


result:

points 0.23999999460 points  0.23999999460 Correct: 52 robot(s) used, 1 hour(s) passed

Test #132:

score: 18
Acceptable Answer
time: 0ms
memory: 3616kb

input:

K

output:


result:

points 0.23999999460 points  0.23999999460 Correct: 52 robot(s) used, 1 hour(s) passed

Test #133:

score: 18
Acceptable Answer
time: 2ms
memory: 3484kb

input:

K

output:


result:

points 0.23999999460 points  0.23999999460 Correct: 52 robot(s) used, 1 hour(s) passed

Test #134:

score: 18
Acceptable Answer
time: 2ms
memory: 3604kb

input:

K

output:


result:

points 0.23999999460 points  0.23999999460 Correct: 52 robot(s) used, 1 hour(s) passed