I brushed the questions on CF today, and saw a question, a simple greedy question, and I quickly seemed to have a solution. But no matter how I changed it later, it was TLE. I was so embarrassed that I took someone else's AC code, and it turned out to be A. This ruled out the problem of OJ. Then I continued to find the reason in the code and found that I was the only one with him. The difference is that they use a single variable instead of the array I used.
Lesson: don't use arrays if you can use a single variable.