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

Re:终于ac了

Posted by luxudong at 2011-07-16 15:20:32 on Problem 3399
In Reply To:终于ac了 Posted by:xiaolijian at 2010-08-06 20:59:31
没天理啊,这都能ac;
用下面数据测试:
7 6
-1
-2
-3
4
5
6
-8
结果居然是:
5 5 4 0 -1 -2
程序体内,n个错误,如
else
{
    c=c+2;
    t[times]=a[j];
    t[times]=a[j-1];
}
第二个明显应该是times+1;

for(i=0,j=d-1;i<d,j>=0;i=i+2,j=j-2)
i=i+2,j=j-2
i和j的加2减2处理明显应该放在各自条件下

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