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:搞不懂代码哪里有问题啊,求大神指教啊,万分感谢!

Posted by zifeiy at 2019-06-08 14:15:30 on Problem 2796
In Reply To:搞不懂代码哪里有问题啊,求大神指教啊,万分感谢! Posted by:zifeiy at 2019-06-08 14:04:40
原来是卡
1
0
这组数据了,原来数组中可以存在1,
所以我把 init 函数里面的 ans = 0; 改成 ans = -1; 就 TLE 了。~~
这道题比较卡数据,所以再把 cin、cout 改成 scanf、printf 就过了。

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