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

WA的朋友注意考虑一下是不是去重的时候把 pii (0, x) (x > 0)给去掉了

Posted by heavyshower at 2020-02-05 16:42:04 on Problem 3977
本来总和相同的情况下可以只考虑使用数字最少的方案。但是这题要求方案必须是非空集,有可能使用了总和为0,数量不为0的方案;所以如果有去重的操作就会把要使用的方案给去掉了

一个样例
input:
3
1 0 -1

output:
0 1


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