yay research! i found a paper!
whoops, this solution is a fluke. lol, guess i should have trusted the paper more.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
% I have rescored solutions , somme asserts were missing in the test suite
|
2 | Pass |
%%
x = sparse(100,1000,0.01);
y_correct = 4016;
assert(isequal(your_fcn_name(x),y_correct))
|
3 | Pass |
%%
x = sparse(10000,10000,pi);
y_correct = 40016
assert(isequal(your_fcn_name(x),y_correct))
y_correct =
40016
|
4 | Pass |
%%
x = sparse(10,15);
y_correct = 76
assert(isequal(your_fcn_name(x),y_correct))
y_correct =
76
|
5 | Fail |
%%
B = [ 41 11 0
52 22 0
63 33 13
74 44 24 ];
d = [-3
0
2];
x = spdiags(B,d,7,4)
y_correct = 140
assert(isequal(your_fcn_name(x),y_correct))
Error: Assertion failed.
|
6 | Pass |
%% Random sparse matrix (harder)
%x=sprand(100,1000,0.01);
%z = whos('x')
%y_correct = round(z.bytes)
%your_sol = round(your_fcn_name(x))
%assert(isequal(round(your_fcn_name(x)),y_correct))
|
7 | Pass |
%% Prevents cheating
filetext = fileread('your_fcn_name.m')
assert(isempty(strfind(filetext, 'whos')))
assert(isempty(strfind(filetext, 'who')))
filetext =
function y = your_fcn_name(x)
y = 16*nzmax(x)+4*size(x,2);
end
%This code written by profile_id 2722350
|
5737 Solvers
Make an N-dimensional Multiplication Table
106 Solvers
1208 Solvers
given 3 sides, find area of this triangle
600 Solvers
479 Solvers