F其实不需要t2,t4的情况,选t1,t3一定更优,但因为0是不能取的,所以t1可能等于t2 - 1,特判一下就行 (附上题解改后的代码) https://ac.nowcoder.com/acm/contest/view-submission?submissionId=49358561