100 problems done! A small milestone to celebrate.
First, check whether a feasible solution exists.
Then start from each node and find the first one that can reach the end.
Got AC. I believe the approach is correct, but I’m not 100% certain.
| |
100 problems done! A small milestone to celebrate.
First, check whether a feasible solution exists.
Then start from each node and find the first one that can reach the end.
Got AC. I believe the approach is correct, but I’m not 100% certain.
| |