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 sosoquan at 2007-04-05 13:04:32 on Problem 3211
In Reply To:请帮我看看这种做法问题出在哪里,我已经做了一晚了,就是不能AC,晕死了!! Posted by:sosoquan at 2007-04-05 03:30:28
我的思路:
1.先把时间与color存放到c[][];
2.再从中提出同种color的存入temp[],并进行排序;
3.boy/girl拿了耗时最大的洗,花的时间分别累加到s1;
4.girl/boy选择耗时次大洗,花的时间分别累加到s2;
5.判断同种color是否已处理完,未完就返回第3步,根据s1,s2两者的大小来进行判断,若s1<s2,则boy/  girl选先,否则, girl选先;否则进入下一步;
6.最后选择max(s1,s2)加到total中
7.所有衣服洗完?否,返回2处理另一种color
8.输出total;
问题:  提交时,wrong answer, 也许有此特殊的例子不能这样处理,但我找不出原因何在!请高手帮偶看看,万分感激!

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