Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:兄弟们啊,直接用快排,就几行代码,1782MS,水过!!!不过开始用while(gets(tree[n++])!=NULL);wa了我3次,改成while(gets(tree[n])!=NULL)n++;就ac了,为什么呀?In Reply To:Re:兄弟们啊,直接用快排,就几行代码,1782MS,水过!!!不过开始用while(gets(tree[n++])!=NULL);wa了我3次,改成while(gets(tree[n])!=NULL)n++;就ac了,为什么呀? Posted by:61886510 at 2012-02-06 13:13:23 while(gets(tree[n++])!=NULL); 中的n++会在最后多执行一次。 最后再n--即可。 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator