what is the problem with my code can anybody help me figure it out.
the logic which i figured out was that for any query
this set of queries should not exist
where (i, j ,k) belong to 1<=i,j,k<=n
as for if the element set existed , one of elements in set
which is common i.e. j is transported to other corner then too i is eaten by k
hence transportation can’t be done. please tell if possible error exist
Try cases like:
Your solution doesn’t give any output…
i am not asking for test cases but problem with the logic
While you didn’t described your logic, you can hardly ask for that. From my point of view, failing test case is always preferred. Read this.
It is true that (i,j), (j,k), (k,i) should not exist. If it does, the output should be NO… But you are neglecting other cases where a NO (or YES) is possible. That’s the reason for the WA!
can you please let me know those cases.
Consider (i,j), (m,n)… This will also give a NO always