Problem Description
Loading...
Problem Analysis
At first glance I had no idea
A second glance and it seems to have nothing to do with graphs
Think again and it feels pretty simple
Write it out…
WA’d -.-
At the time I didn’t notice this sentence:
He can choose to teleport to the 1st pillar or the nth pillar at any position
I thought it meant teleporting to any pillar…
Then I had to look for the pattern all over again…
By the way, isn’t this somewhat similar to
the BFS I’m reading about right now…
So I won’t analyze the problem…
Just look at the code~
Discuss it case by case
cpp
| |