Ahttp://www.z-trening.com/new/www/html/submit.php?submit=7100047709&subm_code=1
I need some help with this one , it passes for the first 3 testcases , then next 7 get WR.
I can't find any logical faults , so i hope somebody can help me.
AWell , I first read all the input as strings and eliminate duplicates.
After that I sort them by length (longer numbers are bigger then smaller ones).
After that I see what is the length of my solution and then I
put all strings of the solution length in one vector and sort them
(numbers with same lengths ordered alphabetical is the same as sorting them by value).
Then I just pick the solution and print it out.
moh.that is a big code,but string is < or = 255 so you must use char because there can be 1000 digits
AUmmm , no a string can hold up to 32k+ items (as far as i know or was it 65k)
EDIT: Tested it for 100 k and it works , so no problem with that.
AHmmm , dunno why i should try it (its not far away from C++ strings)
But how am i supposed to sort the vectors by length of the numbers and maps are not that good with char arrays either.
iWhat about negative numbers? :)
h5 3
21111111111
-333333
0
000022
22
edited by boba5551: Please, use English.
mpost your code here and we will help you
AOK , ill redo it a bit , i didn't take negative numbers in account. Ill also eliminate leading zeroes.
kCan someone help me?
http://z-trening.com/submit.php?submit=7100340216&subm_code=1