Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
tic
urlwrite('http://contest.usc.edu/index.php/Fall12/Home?action=download&upname=driving.in.txt','driving.in.txt');
toc
Elapsed time is 0.387509 seconds.
|
2 | Pass |
%%
fid=fopen('driving.in.txt','r');
xy_expect=[3 2;2 29;107 23;-79 -72];
qty=fscanf(fid,'%i',1);
for q=1:qty %qty
n = fscanf(fid,'%f\n',1); % commands
m=cell(n,1);
for i=1:n
m{i}=fgetl(fid);
end
[xy]=Drive(m) ;
assert(isequal(xy,xy_expect(q,:)))
% fprintf('Q %i x %i y %i Pass %i\n',q,xy,tf)
end % q
fclose(fid);
toc
ans =
3 2
ans =
2 29
ans =
107 23
ans =
-79 -72
Elapsed time is 0.852154 seconds.
|
6723 Solvers
Find common elements in matrix rows
1232 Solvers
829 Solvers
Criss_Cross_010 : Unique elements, Square array, Words in one array
8 Solvers
Return a list sorted by number of consecutive occurrences
173 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!