How to solve this task, bruteforce with string insertion is to slow?
Z-lastchar
with two lines of code :)
Well I don't know that two lines :D , I tryed for about and half an hour and couldn't think of solution :D
Admin is the bug when we get TLE and it is memory limit exceeded solved ? I'm constantly getting TLE for z-lastchar and I don't know why.
http://www.z-trening.com/new/www/html/submit.php?submit=7100056465&subm_code=1
http://www.z-trening.com/new/www/html/submit.php?submit=7100056465&subm_code=1
Have you used long long int?
Solved Thanks to Amtrix!
Admin, sorry for creating a new topic :(
Admin, sorry for creating a new topic :(
don't apologize, that's what forum is for
Can somebody explain why the solution with 1<<N in code won't work ?
Bit shifting will only work with integer. Doesn't work with llint !
tnx
if you write 1, it is considered as int (long)
you can write (long long)1 << N
you can write (long long)1 << N