I’m stuck with this problem, Atul and Astha Chronicles 2.
link: https://www.spoj.com/problems/AAC2/
I’ve been thinking over it for a long time, I don’t get what approach should I use.
What i think should work: Build graphs from the given equations, and merge the formed graphs, and cross check with inequality graphs then.
But it’s not working. Please suggest me in words how should i approach the problem what algorithm should I use?