getting WA VOTERS

can anybody tell on which case i am getting WA? getting WA on 0.27 sec.
i am finding common number in a[] and b[]. if number is common b[i]=-1, so that i would not consider b[i] again when finding common between c[]. if a number between a[] and b[] is not common, add the a[i] in b[] so that this a[i] could be compared with c[] through b[] .
then sort b[] and compare b[] with c[]…
here is my code link

Hi @the_c0der,

I won’t tell you that there is a bug at line xy, simply because that’s not my style…

I believe that every coder:

  • will learn more if he/she find the problem by himself/herself, analyze that problem and realize what’s the cause of the problem and also
  • he/she is able to fix the problem without further help

So I just say, that your code return incorrect answer for

2 3 1
-4 -2
-6 -4 -2
10

(yes, I know I modified input a little, but that’s not the problem for your code)

thanks sir for replying.got my mistake.

1 Like
//