Could you please post the link to ASEE Challenge June 10-13? Thanks!
Amitava, do you mean here? The link is http://www.mathworks.com/matlabcentral/cody/?sort=created+desc&term=group%3A%22ASEE+Challenge%22
it seems that tests no3 and no4 are incorrectly defined. Ned, check this out please.
@Vieniava, can you be more specific? The tests are the same in all cases. I did verify that Solution 173962 does indeed get an incorrect answer to tests 3 and 4.
This was fun
A lot a very beautiful solutions.
What was changed on 5th. November?? :-/
I added a new test. I periodically strengthen test suites to defeat look-up table strategies.
I solved this with matlab inbuilt function 'combnk'. Is that not allowed? It gives me the error 'Undefined function' everytime I run my solution.
Aryaa: Your solution looks good. The problem is that combnk is in the Statistics Toolbox, and Cody is designed to use only functions from basic MATLAB.
I used random numbers, but couldn't get it. :( (worked fine in my laptop.) :( I guess I haven't completely understood the question. :((
why do i get internal server error :(((
Hassan, where are you getting an internal server error? Maybe leave your comment on the solution that has the related error? I'm guessing that your solution relies on randomness, so if you don't get lucky, the answer will time out. You may get lucky on your computer, but not on the Cody server.
A basic one liner with intlinprog, but not an option in Cody. :)
This problems keeps giving me:
While evaluating the solution, the server encountered an error caused by temporary unavailability of MATLAB Service. Wait a few minutes for the MATLAB Service to return, and then rescore.
ONLY this problem????
My solution works for all combinations but test case is not designed well
Because the two line version runs out of memory with dec2bin ...
Ha! Out of memory error for matrix multiplication :)
(lol) An expectedly poor score, but still fun to write it in recursive form. Accomplished by adding spare arguments both as input to and output from split_it, then calling split_it recursively as needed.
smart cheater :)
Would be much harder problem if you did not allow repeated index numbers and insisted on numerical index instead of logical
combnk is not accepted ! ! !
nchoosek works :)
Should this work for the last test!!!
why does the error "out of memory" not show?
Because once found, the function returns, thus diminishing the possibility of large I
This is not the shortest, but it is a oneliner.
Only allowed by a too simple test suite...
This should be the best noted solution :
- No brute-force search
- No "regexp" trick
- No cheating (allowed by a too simple test suite)
Wonderful solution with a factorization of ans.
make full use of "half of the sum"
Matrix which contains the values of an other matrix A at the given locations.
Sophie Germain prime
MATCH THE STRINGS (2 CHAR) very easy
Area of an equilateral triangle
Create a vector
Twist 'n' Match
When Was That Goal Scored?
Remove the air bubbles
Would Homer Like It?
Twins in a Window
Find the treasures in MATLAB Central and discover how the community can help you!
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office