# Order exercises

# Order exercises

- T
themik + 0 comments Hi, this problem is frustrating me to no end. I don't want to post my code here to avoid spoilers, but any suggestions why 5 out of the 16 test cases could fail (7, 10, 11, 12 and 16) while the rest passes happily. When comparing my output with the expected one, I see that the first several thousand lines are correct but then i am having a few additional sums in my results list that are missing from the expected output. E.g. in test case 10 I produce one more 129, one more 127, one more 91, etc than expected. I can't figure out the flaw in my algorithm. Any ideas?

Thanks a lot!

- DT
dthalke031 + 0 comments Hi, Can anyone Please tell me how many disjoint part for bellow Data:

100 16

9404 8036 -9334 -9146 8085 3024 988 5875 2264 -4643 -8916 -8072 1954 3424 5364 -2633 -8910 -7310 9443 -5096 4982 -7834 5164 -8360 185 265 277 -4154 -6615 6233 5988 -9008 5849 -948 6458 -9633 7955 432 1308 6533 -4667 9545 9446 1002 4452 -2285 -2413 -8734 4224 5492 -6250 -38 -3089 -6761 2326 -2209 -7962 -929 5710 -391 -6415 5399 4758 933 -3318 -8572 566 8181 -1512 -2937 -5897 5525 -7054 912 -8863 -4893 2963 -8827 -8376 5579 -8906 2265 5349 9388 4664 5708 2630 -4177 7665 6774 -5152 -5504 6138 2018 2464 3936 -5985 9804 -9520 1245

smpallen99 + 1 comment I dont understand the disjoint part. Why is a|4,4| with sum of 2 greater than a|2,2| with sum of 4?.

Am i correct to understand that the unsorted subsets of [2,4,6] are [2,4,6], [2,4], [2], [4,6], [4], [6]?

harjolgoo + 0 comments disjoint means if you already used [1,2], you cannot use [1] or [2] again, so the next greater should be 4.

ashtefan + 0 comments Why isn't there a test 100000 100000 1 -1 1 -1 1 -1 ... ? I've seen several naive solutions which have 100 points but it took them over 70 seconds to pass this test on my computer while correct solutions written in Haskell work in less than 2 seconds (approximately 1.2-1.4 seconds for several solutions)

stachu + 0 comments Hi, Great challenge ;) Can you open it for non-functional languages also?

No more comments

Sort 5 Discussions, By:

Please Login in order to post a comment