Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Where in your code do you test for that? Probably k is < 0 and you're getting a segmentation fault.
Damn, I forgot about this :\
If you return nothing in C++, you'll instantly receive
error 132
, and there will be no output in the stdout.@Chrono79's snippet should work fine.There should be areturn
statement at the end of the function for it to compile.You're welcome. I always thought you used the print the input part before your code, and didn't know about what FArekkusu says down below (C++ is not one of the languages I know best).
How could you not know the values if they're printed in the screen?
Analyze that input, read the docs on the methods your function use (specially how it handles those input values) and you'll have to change it to fix it.
You were told to print input, and given a link saying how to print a vector; are you not very smart?
https://stackoverflow.com/questions/10750057/how-to-print-out-the-contents-of-a-vector
Your code is failing the 9th test, labeled Test 8 (I though it was another one), try printing the input and you'll see why, it's easy to fix. It's not related to same multiplicity and your code is ok about deleting the values.
Maybe showing your code would help.
But, deleting elements on an array you're looping through is never a good idea, you'll be skiping values like that if you're not careful enough.
Check the input values. Read the instructions again, specially
...with the same multiplicities...