WHY I AM GETTING RUNTIME ERROR SIGSEGV? (BINADD)

HI,
I am solving Binary addition but i dont know where i getting SIGSEGV error please look at it for moment.
the problem link is

the solution link is:

https://www.codechef.com/viewsolution/28525615

Not working for
1
1000
100000

max_element is giving error