Wrong judge solution
feodorv asked 2 years ago
Alas, the solution used to generate the judge output from the judge input is wrong. It assumes that the input contains only connected graph but seems the judge input contains disconnected graph(s). So to get AC you should only check the connected component which includes ID #1. Otherwise you get WA 10% :(
5 1 4 2 3 5 3 2 5 4 1 5 2 3 0
Here we have two connected components 1-4 and 2-3-5. In general the answer to this input should be NAO, but if we consider only one connected component with id #1 (i.e 1-4) then the answer becomes SIM.
This topic has not been answered yet. Be the first!