how can i remove(delete) my question from forum…??
I read this problem and also the solution. This problem don’t have weak test cases, but they’ll pass using some hashing technique and some may not work
For long string , this solution is working as you are calculating fibo%(2^64-1), as in using first loop we are just putting this value in a long long variable and by default it balances overflow using mod 2^64 -1 and then we start from 1,1 and iterate till 6000 , (6000th fibo has more that 1000 digits) and then checking if after taking modulo we get same result as earlier. Thats it. there is probability of collision!
collision here means that you are hashing all the fibonacci numbers by 2^64-1 which may map two different values at the same place. Though you are not directly using hashing but When there is overflow then calculation is done automatic by taking modulo by the largest number that can fit in that data type.
@dracowane. I think it is unfair to blame the test cases just because of the hashing solution passed with modulus 2^64. Solutions with an extremely high probability to pass is obviously a correct solution for the contest's/problem's purpose. It is not possible for the problem author to prepare tests against a specific hashing technique/parameter as these are unknown to the author. Besides you can use multiple hashing with different parameters to increase the success rate of such hashing based solution. So IMO this should not be called "weak test cases".
sorry for weak test case data…thanks for response…guys
Get More Details-
pest control services in laxmi nagar @ http://pest-control-delhi.pestcontrolindelhi.com/pest-control-in-laxmi-nagar.html
pest control preet vihar @ http://pest-control-delhi.pestcontrolindelhi.com/pest-control-in-preet-vihar.html
pest control vikaspuri @ http://pest-control-delhi.pestcontrolindelhi.com/pest-control-in-vikas-puri.html
pest control vasantkunj @ http://pest-control-delhi.pestcontrolindelhi.com/pest-control-in-vasant-kunj.html
pest control services in dwarka @ http://pest-control-delhi.pestcontrolindelhi.com/pest-control-in-dwarka.html
one more solution , you can close your question too…
Hey, chill!, well i am sorry to blame test cases, but this solution, modulo 2^64-1 was a naive solution, some coders code it assuming that everything will fit in unsigned long long and it passed and some coders were struggling knowing that 1000 digit number can’t be stored in unsigned long long and was thinking about something else! so i feel that cause of test cases, many suffered so i called them weak. well i’ll edit my answers
what is pest control services??
these links are no opening in pc???