Problem Description
Problem Analysis
At first, I thought it was a very simple problem
but I ended up writing this much
Let me post the code first:
| |
It was still a Chinese problem on page 11 of HDU
For the first time, I felt the full malice of ACM…
At the time, I naively thought it would be like this:
| |
But!
After getting WA
I read the discussion board
and felt the atmosphere was weird
My senior also said not to do this problem for now
Some even said they still haven’t ACed this problem to this day
But… a newborn calf is not afraid of a tiger
I was so happy when I finally ACed it
In the end, I found that what had been holding me up all along was an array initialization issue -.-
My approach was correct all along
And my code even seems to consider some things that didn’t need to be considered
Anyway…