This is link to my solution for SAMESNAK problem asked in qualifier of codechef snackdown 2017. I am not able to figure out why I am getting the wrong answer. Any one please help me with this.
It’s clearly visible that it’s range falls in integer. Why do you want me to try with long.
Caught the problem.
Input
1
10 4 1 4
4 4 4 4
Output
yes
Correct output. But what if i tweak it to-
Input
1
4 4 4 4
10 4 1 4
Output
no
Expected Output
yes (same as previous)
I am glad it helped dear