Cody

Solution 857291

Submitted on 26 Mar 2016 by Jean-Marie Sainthillier
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
feval(@assignin,'caller','score',100);

2   Pass
tic urlwrite('http://rmatlabtest.appspot.com/testsuite_GeneSeq_contest.mat','testsuite_GeneSeq_contest.mat') toc

ans = /users/mss.system.a8FBlo/testsuite_GeneSeq_contest.mat Elapsed time is 0.349534 seconds.

3   Pass
load testsuite_GeneSeq_contest cases=size(testsuite,2); Result=zeros(cases,3); for i=1:27 % Practice runs segments=testsuite{i}; solution = geneseq(segments); end % i cases for i=1:29 %1:29 %cases segments=testsuite{i}; OriginalGene=one_answer{i}; t0 = cputime; solution = geneseq(segments); % 99.998065 51667.47 0.452 time_elapsed = cputime-t0; % Check = checksequence(segments,solution); Check=1; for ichk = 1:size(segments,1) if isempty(findstr(segments(ichk,:),solution)) Check=0; break end end if Check == 1 Result(i,1) = length(solution); Result(i,2) = time_elapsed; Result(i,3) = length(OriginalGene); else Result(i,:) = Inf; end end % i cases fprintf('Net Time=%10.6f\n',sum(Result(:,2))) fprintf('Result= %10.6f\n',100*sum(Result(:,1))/sum(Result(:,3))) v=1000*(sum(Result(:,1)./Result(:,3))/size(Result,1)-1)+ sum(Result(:,2))*10; fprintf('Final Score %.2f\n',v) fprintf('L %5i Time %7.3f L_orig %5i\n',Result') assert(max(Result(:,1))< Inf) feval( @assignin,'caller','score',floor(min( 100,v )) );

Net Time= 12.070000 Result= 381.549358 Final Score 4425.12 L 65 Time 0.050 L_orig 65 L 93 Time 0.320 L_orig 65 L 148 Time 0.870 L_orig 65 L 100 Time 0.040 L_orig 100 L 282 Time 0.320 L_orig 100 L 155 Time 0.840 L_orig 100 L 182 Time 0.080 L_orig 65 L 182 Time 0.610 L_orig 65 L 240 Time 1.620 L_orig 65 L 157 Time 0.080 L_orig 100 L 156 Time 0.610 L_orig 100 L 214 Time 1.620 L_orig 100 L 276 Time 0.120 L_orig 100 L 275 Time 0.900 L_orig 100 L 276 Time 2.430 L_orig 100 L 763 Time 0.000 L_orig 67 L 138 Time 0.220 L_orig 97 L 62 Time 0.230 L_orig 37 L 2943 Time 0.000 L_orig 37 L 89 Time 0.610 L_orig 67 L 214 Time 0.230 L_orig 97 L 2250 Time 0.000 L_orig 400 L 252 Time 0.220 L_orig 200 L 125 Time 0.050 L_orig 100 L 16 Time 0.000 L_orig 10 L 27 Time 0.000 L_orig 26 L 26000 Time 0.000 L_orig 5000 L 91200 Time 0.000 L_orig 20789 L 70278 Time 0.000 L_orig 23456

Suggested Problems

More from this Author276