Cody

Solution 811467

Submitted on 21 Jan 2016 by goc3
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
%% % Thanks to Alfonso Nieto-Castanon urlwrite('https://sites.google.com/a/alfnie.com/alfnie/software/SetSolutionScore.p?attredirects=0&d=1','SetSolutionScore.p'); rehash path;

2   Pass
%% fh = fopen('EvaluateSolution.p','wb'); fwrite(fh, hex2dec(reshape('7630312E30307630302E3030000E501C677E5FB10000006D000000D20000011913C0FE1CB1DCFB0EAA5AF856073976051831C95E8D334FE36CD669CF5BF744E1161AA6E2626D6FCADA7C4C614946CCB161197CAC7669759DCC74F111D48BE15A97429389C1D5EF5C61BA6AF9C735F6B819F7A12D0870F8A583D6E17EC695B1F38F3B6F245C9126934D9A3BAEBE1B3EB491EC86B99D31CE1265BC7AEB41CDBB4EE66443A9D8D68B5520B1A41DC2AF3D5E10D0E5520B2FEC6B27A923229B0F53B8782D8C186F881812658B74C34C83D93669851285BF570F637CB64D19CB5F1DC2E8AF8CB2324F1D8C467E170E921D55B45BC9',2,[]).')); rehash path; fclose(fh);

3   Pass
%% x = ones(3); y_correct(3,3) = 0; y_correct(3,:) = 1; assert(isequal(HoH(x),y_correct))

y = 0 0 0 0 0 0 1 1 1

4   Pass
%% x = repmat((1:10).',1,3); y_correct = 10*ones(1,3); assert(isequal(HoH(x),y_correct))

y = 10 10 10

5   Pass
%% x = [1 2 2 3 2 3 3 6 1 3 1 1 6 3 2 5 2 2 4 2]; y_correct = [1 0 3 5 2 1 1 0 0 1 0 0]; assert(isequal(HoH(x),y_correct))

y = 1 0 3 5 2 1 1 0 0 1 0 0

6   Pass
%% S = 1e7; m = 50; n = ceil(S/log(S)); t = zeros(3,1); for k = 1:numel(t) x = randi(S,n,m,'uint32'); t0 = builtin('tic'); y = HoH(x); t(k) = builtin('toc',t0); assert(EvaluateSolution(x,y)); end SetSolutionScore(round(mean(t)*10));

y = Columns 1 through 8 583234 583140 583109 583181 583131 583065 582968 583518 18052 18074 18102 18085 18068 18058 18177 17864 357 367 364 350 375 401 357 381 3 8 4 5 6 8 7 8 0 0 0 0 1 1 0 0 Columns 9 through 16 582955 582807 583056 583335 583153 583403 582904 582678 18102 18175 18097 17970 18033 17944 18168 18253 414 416 381 366 390 370 383 395 5 4 7 12 8 5 8 13 0 0 0 0 0 0 0 0 Columns 17 through 24 583241 583289 583343 582938 582645 582727 582946 583048 17986 18031 17955 18154 18342 18256 18159 18132 397 350 380 381 352 386 383 363 3 5 7 8 9 6 2 5 1 0 0 0 0 0 0 0 Columns 25 through 32 582967 582861 582961 583615 583321 583069 582597 583132 18195 18169 18162 17830 17983 18093 18339 18050 352 402 376 370 374 382 374 387 2 4 2 9 3 5 6 7 0 0 0 0 0 0 0 0 Columns 33 through 40 583127 583292 583141 583552 583461 582975 583536 582907 18105 17963 18053 17829 17921 18140 17876 18204 356 389 386 401 363 382 371 362 4 9 4 2 6 5 5 5 0 0 0 0 1 0 0 0 Columns 41 through 48 583105 582624 582886 582393 583123 582988 582920 582967 18082 18296 18138 18450 18099 18126 18198 18153 376 399 413 364 360 387 355 373 6 2 5 9 5 5 10 6 0 0 0 0 0 0 0 1 Columns 49 through 50 583143 583161 18143 18087 324 354 5 6 0 0 y = Columns 1 through 8 582634 583164 583011 583416 582721 582958 582912 582716 18287 18046 18144 17961 18268 18161 18182 18284 395 383 358 353 384 371 375 371 7 4 12 6 3 7 5 6 0 0 0 0 0 0 0 0 Columns 9 through 16 582894 582761 582929 582891 583261 582949 582897 583310 18188 18257 18144 18187 18009 18126 18168 17905 377 374 381 376 374 396 392 419 5 6 14 7 5 8 3 11 0 0 1 0 0 0 0 0 Columns 17 through 24 583121 582777 583905 583493 582946 582772 582998 583107 18109 18213 17708 17847 18136 18179 18154 18056 350 394 353 402 393 417 365 394 8 9 9 7 6 10 5 5 0 0 1 0 0 0 0 0 Columns 25 through 32 583199 583309 582912 583415 582993 582959 583063 583309 18068 18006 18189 17917 18107 18220 18111 17925 354 360 365 384 398 335 372 414 6 5 9 5 5 3 5 5 0 0 0 0 0 1 0 0 Columns 33 through 40 583268 582797 583186 583303 583008 583070 582915 583305 18054 18239 18097 18010 18101 18093 18173 18002 339 374 339 358 393 375 376 364 7 6 6 6 8 10 8 5 0 0 0 0 0 0 0 0 Columns 41 through 48 583441 582687 583082 582799 583033 583071 582828 583058 17956 18302 18110 18261 18140 18089 18157 18077 352 366 369 360 360 384 421 395 3 8 3 5 7 5 4 6 0 0 0 0 0 0 0 0 Columns 49 through 50 583058 583052 18092 18111 381 377 9 4 0 0 y = Columns 1 through 8 583141 583267 582634 583270 583354 583353 583238 583312 18015 18031 18324 18000 17963 17944 18006 17974 402 356 369 377 371 384 381 379 11 6 8 5 7 7 7 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 9 through 16 582907 582966 582966 583140 583215 583304 582567 583619 18213 18165 18160 18038 18039 18010 18345 17809 352 367 369 399 368 359 377 385 8 6 7 2 6 5 7 6 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 Columns 17 through 24 583383 582580 583018 582912 583558 582889 583738 582993 17930 18361 18196 18197 17892 18230 17763 18132 386 365 329 361 353 352 379 380 5 6 6 8 5 4 5 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 25 through 32 583260 583303 583512 583394 583013 583098 583178 583034 18039 17923 17849 17901 18104 18082 18041 18152 353 417 397 399 388 373 383 357 6 4 5 7 9 10 3 3 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Columns 33 through 40 583364 582611 583016 582849 583005 583447 582840 582331 17985 18368 18162 18225 18139 17902 18204 18466 357 354 347 368 371 386 383 378 4 3 10 3 5 3 6 6 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 Columns 41 through 48 582848 582983 583103 583039 583610 583531 583005 583149 18210 18151 18085 18132 17837 17860 18148 18073 376 368 376 367 371 374 364 370 5 8 5 3 6 12 7 4 1 0 0 1 0 0 0 0 0 0 0 0 ...