Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

坑点!

Posted by 111_a at 2019-12-19 17:55:44 on Problem 1470
1:如果使用离线LCA算法做这道题的话,查询数的最大值要定义为50W!
2:多组输入!
3:需要对根节点进行特判,因为第一个点不一定是根节点!
4:然后一直看大家都说输入有问题,输入直接在括号前面加上一个空格不就直接吸收缓冲区里面的回车了吗。
scanf(" (%d %d)",&x,&y);
5:别忘了清空数组,因为如果你一开始是用单组输入的话,改成组输入的时候确实很容易忘。

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator