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.
luckily I solve this problem alone, but thanks for useful advices :)
have a nice day
Thanks for your reply.
I've got type, i don't know why its don't appear when i paste the code here.
Second tip doesn't help, still the SIGSEGV error occurs.
Here is a proper code:
#include
const std::vector countPositivesSumNegatives(const std::vector input)
{
int neg=0,pos=0;
if (!(input.empty()))
{
for(int i=0;i<input.size();++i)
input[i] > 0 ? ++pos : neg+=input[i];
if (!pos || !neg)
return std::vector();
else
return std::vector ({pos,neg});
}
else
return std::vector();
}
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution