結果

問題 No.3002 テストケース
ユーザー krotonkroton
提出日時 2014-12-24 00:57:13
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 3 ms / 5,000 ms
コード長 11,575 bytes
コンパイル時間 601 ms
コンパイル使用メモリ 52,904 KB
実行使用メモリ 4,372 KB
最終ジャッジ日時 2023-09-02 22:40:27
合計ジャッジ時間 1,902 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,372 KB
testcase_01 AC 1 ms
4,372 KB
testcase_02 AC 2 ms
4,372 KB
testcase_03 AC 2 ms
4,372 KB
testcase_04 AC 2 ms
4,368 KB
testcase_05 AC 2 ms
4,372 KB
testcase_06 AC 1 ms
4,372 KB
testcase_07 AC 2 ms
4,368 KB
testcase_08 AC 2 ms
4,372 KB
testcase_09 AC 2 ms
4,368 KB
testcase_10 AC 3 ms
4,372 KB
testcase_11 AC 1 ms
4,368 KB
testcase_12 AC 1 ms
4,368 KB
testcase_13 AC 2 ms
4,372 KB
testcase_14 AC 2 ms
4,372 KB
testcase_15 AC 2 ms
4,368 KB
testcase_16 AC 1 ms
4,372 KB
testcase_17 AC 1 ms
4,372 KB
testcase_18 AC 1 ms
4,368 KB
testcase_19 AC 2 ms
4,368 KB
testcase_20 AC 2 ms
4,372 KB
testcase_21 AC 2 ms
4,368 KB
testcase_22 AC 2 ms
4,368 KB
testcase_23 AC 1 ms
4,368 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cstdio>
using namespace std;
typedef unsigned long long ull;

int test_nums[] = {10, 10, 20, 10, 20, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10};
ull test_in_hshs[]  = {9568975648972884578ull,4380168123086890352ull,17442569791126371914ull,1175350031435102881ull,14700546671548648904ull,12889147486004122272ull,7712971957200782131ull,16427843506681174804ull,11790620284178653265ull,4886413865911520779ull,590697261959971931ull,15672523509609424299ull,15671526252562826131ull,11785309445292013801ull,14006135836469387409ull,7976458800868880607ull,9458113640378983597ull,5560653744080507487ull,728063974954025731ull,12266185937530246816ull,590696162448343700ull,15672523509609424299ull,590697261959971931ull,16952589465638105643ull,11786299005757214476ull,4504885184613340527ull,14991128891142105896ull,15834596185908402254ull,16594663180235364046ull,6137177227319130693ull,10738944485814607936ull,9790301312545704660ull,6340111928611041255ull,9059692507200090180ull,12066782924400553544ull,1486152778400373837ull,15512994248282756358ull,16814051855163314838ull,14662715802154295925ull,17967053412144328714ull,3627807153655698724ull,3722170778501189757ull,11507467527437385578ull,13690204466303256338ull,8750267758837113903ull,9352697537270827981ull,15786469587266239669ull,16993815660686375790ull,13705281895020425058ull,3859607857999656954ull,5617880195446984414ull,6636032306660261689ull,15312153125128018276ull,10284074505187113585ull,5158083400289523649ull,9303377043150462855ull,7183044808579866087ull,13889168577162666639ull,11051154008224410215ull,3956512040677008262ull,6048104609025494251ull,6446060690462769708ull,5735136189470176842ull,17366408479438492382ull,11399134878310487939ull,648424686347634511ull,5275523120955340456ull,18204033998193906830ull,12642239050120302367ull,200716301925293015ull,17121150134904067804ull,15588868252952190517ull,6649231421694206840ull,8195584778950603818ull,3593606048289350151ull,6773618729873179311ull,7889138567559830971ull,8843718171073166708ull,16478248333868382376ull,14993228433983510791ull,590696162448343700ull,15672520211074539650ull,810238853647306752ull,17483926260801544046ull,13370388317600029760ull,13372341050251354050ull,6335320256936243842ull,16591712091025813377ull,14993109111584135441ull,13569659228270577646ull,13366306507313640654ull,16825080878039672526ull,535554294472561945ull,13412173368983827228ull,12870838892283760108ull,5590259214051559472ull,7562232785904294149ull,10865941166610376947ull,15110865243473045004ull,2791517292015426347ull,752897687774129644ull,7514926281202819952ull,4925123821161377443ull,5916819512233044550ull,7909116572848157702ull,3523150357271853476ull,15692084021735910140ull,3034927462969593696ull,5772207604328734438ull,6047411915375539150ull,13648748025826590070ull,12712652608711670476ull,4595636065419325342ull,8997053248173898121ull,11801262916585929269ull,16210296622549881163ull,6900341940991761683ull,14271998649980457660ull,18307216369676525636ull,7862096356867465003ull,3705045738246292903ull,12686805343356272614ull,7940735780354050197ull,15303656523918859431ull,2986939421107475440ull,15711451468795550358ull,14132928879845442053ull,11838338934720066747ull,17741201183826863802ull,13707614432318811684ull,14911880710448549285ull,3722170778501189757ull,13775014269593875710ull,6500395155847107581ull,13089560029046194853ull,3335164583871665634ull,16213841651190729204ull,11448638451545087972ull,17411495342089473813ull,4905214457743318081ull,14531824386925825792ull,13824974538267479205ull,14849993556319259811ull,17222621741291754906ull,18363773943860004607ull,16074105419452620723ull,13414829629486162951ull,15153168302001487598ull,6878468327588371468ull,13023322798857508724ull,3722170778501189757ull,12626034327868328719ull,16319709361249540627ull,3626437539300674026ull,13860380125539243300ull,15050966956722674570ull,6369966271387970340ull,4983774402280958741ull,3436378005003490869ull,831170914686051743ull,11978886158414036325ull,14220466605045553703ull,7017651029426495782ull,14713235661240082455ull,13780970285938836385ull,1924208236452274222ull,7403475137164977243ull,14200186127241271366ull,12649049845659874779ull,17268144626819295541ull,18286811687671650850ull,1059675850260338950ull,685908291199738570ull,12804642887353645718ull,11143338157473689048ull,8104436032909082430ull,570727750944106913ull,16979151610174341491ull,13502238652509631168ull,10545546720964436790ull,2080795267156910686ull,2824144487001264005ull,14738540294918953433ull,17906561141672038106ull,4962144554204949006ull,14238338579043068203ull,58113812962625983ull,5435182331425915213ull,13786222854695043245ull,4725629283458398349ull,1193395070288299154ull,17892690320945281858ull,2865533527038538197ull,8517667359573863925ull,13644022017164506909ull,3527519663772068607ull,17443467064692172251ull,10916943467928743149ull,8917073853400365035ull,17637945973592797703ull,9597149805274932074ull,17998836437135183728ull,7520226622704462774ull,10128467814503399355ull,6044425857189903792ull,12647041886532277297ull,3015030599850119873ull,1153736946779056556ull,12029714423268727151ull,16087563519054111852ull,1371118366089698457ull,7435051587163809118ull,6348174564924267069ull,14014135472200829764ull,11119012977297598664ull,12536606255334967268ull,11305221776964647658ull,5507495318739240741ull,7149893931135203497ull,11583984358793426917ull};
ull test_out_hshs[] = {15671530650609338991ull, 15668731294004481440ull, 15676314625702738927ull, 590693963425087282ull, 590699460983228349ull, 14910920836797310311ull, 15672514713516398595ull, 15676314625702738927ull, 15668722497911455768ull, 15666752173074080110ull, 3488409464740857379ull, 3488409464740857379ull, 3488409464740857379ull, 1227803187174722084ull, 1227803187174722084ull, 3488409464740857379ull, 1227803187174722084ull, 3488409464740857379ull, 1227803187174722084ull, 1227803187174722084ull, 590697261959971931ull, 590691764401830872ull, 15676314625702738927ull, 15676314625702738927ull, 14908092892890119310ull, 15676314625702738927ull, 15676314625702738927ull, 13720047489181271684ull, 11134361178165666661ull, 14002199584841148929ull, 12718583530915495492ull, 13369526300483701577ull, 15676314625702738927ull, 15676314625702738927ull, 15676314625702738927ull, 15676314625702738927ull, 15833595630326919465ull, 16493157471546968542ull, 13715244822390192161ull, 14655135768990923095ull, 12729133970586162078ull, 12916771694099730808ull, 12916771694099730808ull, 12729133970586162078ull, 12729133970586162078ull, 12729133970586162078ull, 12916771694099730808ull, 12729133970586162078ull, 12916771694099730808ull, 12729133970586162078ull, 590699460983228349ull, 590696162448343700ull, 590700560494856544ull, 14907098934378405791ull, 15666740078446169785ull, 14907098934378405791ull, 14907092337308636521ull, 15665891255469380122ull, 14906135762192282160ull, 15668723597423083983ull, 14904294080215407185ull, 15665893454492636540ull, 14907094536331892931ull, 14907097834866777576ull, 15672513614004770396ull, 15671529551097710776ull, 14907101133401662193ull, 14909926878285596788ull, 14904300677285176455ull, 14909930176820481437ull, 590698361471600142ull, 15670680728120921093ull, 590698361471600142ull, 3096330960780350691ull, 12474618027024290529ull, 11466734373925148083ull, 5754126699588273106ull, 3181149242527596469ull, 17979287261712022339ull, 7358435220879158345ull, 6682085646191310141ull, 4049238949345101128ull, 6682085646191310141ull, 6682085646191310141ull, 6682085646191310141ull, 4049238949345101128ull, 6682085646191310141ull, 6682085646191310141ull, 6682085646191310141ull, 4049238949345101128ull, 4049238949345101128ull, 6682085646191310141ull, 1526431649385612200ull, 7350393112919394044ull, 16478730762192818470ull, 11269748030092116325ull, 11269748030092116325ull, 11269748030092116325ull, 11269748030092116325ull, 11269748030092116325ull, 590699460983228349ull, 590699460983228349ull, 590696162448343700ull, 590697261959971931ull, 590696162448343700ull, 590696162448343700ull, 590697261959971931ull, 590698361471600142ull, 590697261959971931ull, 590696162448343700ull, 244619896789486689ull, 15678309139795935231ull, 15679260217354148501ull, 15325994384169478895ull, 9314175880855159900ull, 4869220639041094469ull, 9247114331214760118ull, 5325894404521108337ull, 3620624869054686237ull, 25247596341518187ull, 590696162448343700ull, 15671522954027941514ull, 15669696665213861473ull, 590698361471600142ull, 2862760155639716376ull, 590701660006484759ull, 5934932937950892105ull, 5447395668202312226ull, 4205871590924270504ull, 16566559181765901929ull, 590699460983228349ull, 14910909841681028197ull, 15676314625702738927ull, 9577042912364221437ull, 15664909391585576920ull, 14250366136577175946ull, 13069068435729334668ull, 12441072473837350753ull, 14909924679262340370ull, 14910909841681028197ull, 12729133970586162078ull, 12729133970586162078ull, 12916771694099730808ull, 12729133970586162078ull, 12729133970586162078ull, 12916771694099730808ull, 12729133970586162078ull, 12916771694099730808ull, 12916771694099730808ull, 12729133970586162078ull, 16467163581659314696ull, 8730908815999802750ull, 6223447799077930650ull, 3796459946564883007ull, 8117070231682378457ull, 13638911296385695090ull, 395052548099532695ull, 5420206422200026354ull, 12578761967232850263ull, 14521868099048862797ull, 590699460983228349ull, 15346324991487553312ull, 2605345832557274494ull, 12156111340879764779ull, 12653576874075774289ull, 14356751350398717029ull, 14663354033146454083ull, 10738422537405652312ull, 4174671243758302980ull, 16168596378188014304ull, 15672526808144308912ull, 12972912862020093497ull, 11252737940335716068ull, 14876759397238991728ull, 3300067339253283260ull, 16159086354396612370ull, 15463760349322358673ull, 6352394722218577189ull, 9654866983422775135ull, 11084137590493215896ull, 14906132463657397547ull, 15672525708632680717ull, 13375167894646916852ull, 17482091175894438333ull, 14909925778773968577ull, 14909074756773922504ull, 14247574476553715872ull, 13064284460635934732ull, 14251355697042376617ull, 13065287215240673927ull, 1821389932668654858ull, 4753382658703495253ull, 1231732464017635357ull, 10081021964652807587ull, 3305365569179389320ull, 14555986520405641645ull, 13601528354694686423ull, 15253465262778249882ull, 14369600631941598513ull, 5394144469430954175ull, 9968256528993417401ull, 11764229608360115447ull, 17490662968546268264ull, 17133714036400254420ull, 9013900015194770420ull, 3012198266070510264ull, 4051465907547614283ull, 7723490184216083744ull, 6889845045254995668ull, 9449164307682675601ull, 5414560944941307864ull, 5414560944941307864ull, 15583518043323341774ull, 15583518043323341774ull, 5414560944941307864ull, 5414560944941307864ull, 15583518043323341774ull, 5414560944941307864ull, 15583518043323341774ull, 15583518043323341774ull};

ull fnv_1_hash_64(const string &str){
	static const ull FNV_OFFSET_BASIS_64 = 14695981039346656037ull;
	static const ull FNV_PRIME_64 = 1099511628211ull;
    
    ull hash = FNV_OFFSET_BASIS_64;
    for(int i=0;i<str.size();i++) {
        hash = (FNV_PRIME_64 * hash) ^ (str[i]);
    }
    
    return hash;
}

int main(){
	char c;
	string input;

	while((c = getchar()) != EOF){
		input += c;
	}

	ull hs = fnv_1_hash_64(input);
	int k = 0;
	bool first = true;

	for(int no=0;no<20;no++){
		bool found = false;
		for(int i=0;i<test_nums[no];i++){
			if(test_in_hshs[k] == hs){
				found = true;
			}
			if(test_out_hshs[k] == hs){
				found = true;
			}
			++k;
		}
		if(found){
			if(!first){
				cout << " ";
			}
			first = false;
			cout << (no + 1);
		}
	}
	cout << endl;

	return 0;
}
0