|  | 
|  | 
| | I have Wa #9 please give some tests Try to find minimum amount of peoples with complexity o(1) like that:if ((m * d1) % d2 == 0) {
 b = (m * d1) / d2;
 } else {
 b = (m * d1) / d2 + 1;
 }
 
 Edited by author 26.04.2010 19:58
 i've changedfor(int j=1; j<=i; ++j) cout<<floor(fr)<<' ';
 for(int j=i+1; j<=d2; ++j) cout<<ceil(fr)<<' ';
 
 to
 for(int j=1; j<=i; ++j) cout<<fixed<<setprecision(0)<<floor(fr)<<' ';
 for(int j=i+1; j<=d2; ++j) cout<<fixed<<setprecision(0)<<ceil(fr)<<' ';
 
I have WA #2 ..
 Can somebody give me some tests, please ?:)
 
 
 Edited by author 13.03.2010 14:57
 5 2 3Ans: 3 3 4
 
 5 6 4
 Ans: 7 7 8 8
 My program:
 5 2 3 -> 1 1 8
 
 5 6 4 -> 1 1 1 27
 
 Are these answers correct ?
 No Why it isn't correct? find less diggers solutioninsi your answers are not correct. You need to keep an even distribution.
 Edited by author 27.09.2014 11:20
 
 Edited by author 27.09.2014 11:21
for test 5 6 4 is answer 7 7 7 9 correct?
 Edited by author 13.04.2010 02:05
 
 Edited by author 13.04.2010 02:05
 No.8 8 7 7 id correct.
 Because max(7,7,7,9) = 9 > 8 = max(8,8,7,7)
 and we need to minimize that max.
Also acceptable answer: 8 8 8 6Hope it will help:
 5 5 6
 5 5 5 5 5 0
 
 2 5 4
 3 3 3 1
 
 41 17 16
 44 44 44 44 44 44 44 44 44 44 44 44 44 44 44 37
 
 41 17 15
 47 47 47 47 47 47 47 47 47 47 47 47 47 47 39
 
 31 13 20
 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 21 4
 
 3 3 6
 2 2 2 2 1 0
 
 5 6 4
 8 8 8 6
 
 5 2 3
 4 4 2
 
 3 2 9
 1 1 1 1 1 1 0 0 0
 
 3 4 10
 2 2 2 2 2 2 0 0 0 0
 
 2 3 9
 1 1 1 1 1 1 0 0 0
 
 6 2 13
 1 1 1 1 1 1 1 1 1 1 1 1 0
 
 4 5 10
 2 2 2 2 2 2 2 2 2 2
 This answers for tests right too.
 
 5 5 6
 5 4 4 4 4 4
 
 2 5 4
 3 3 2 2
 
 41 17 16
 44 44 44 44 44 44 44 44 44 43 43 43 43 43 43 43
 
 41 17 15
 47 47 47 47 47 47 47 46 46 46 46 46 46 46 46
 
 31 13 20
 21 21 21 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
 
 3 3 6
 2 2 2 1 1 1
 
 5 6 4
 8 8 7 7
 
 5 2 3
 4 3 3
 
 3 2 9
 1 1 1 1 1 1 0 0 0
 
 3 4 10
 2 2 1 1 1 1 1 1 1 1
 
 2 3 9
 1 1 1 1 1 1 0 0 0
so in every case diggers can work only 1th day and after that just place 0? In most of the cases, nobecause the statement says you should finish the work with a minimal number of diggers
I first do this just output m*d1, 0but its wrong
i found the mistake.
 Edited by author 07.10.2012 17:02
 
 Edited by author 07.10.2012 17:34
Give me some tests, please. I think the reason for WA3 is in the following test5 6 4
 The evaluator accepts 8 8 7 7 but not 8 8 8 6.
 But why is 8 8 8 6 wrong. The max is still only 8.My program outputs 8 8 8 6 and got AC I had the same error. The mistake was in logic.In test 3 3 6 I had 2 2 2 2 1 1 but correct answer is 2 2 2 2 1 0 ,of course.
 I think you are right.but my program which WA#3 output 1 2 1 2 1 2 in test 3 3 6,I think it's right,too....
kindly provide me the correct solution of this in c#.m * d1 is count of men needed to complete work in 1 day. You should divide this count into d2 days. On obvious way to do it with min men per day is to add men equally to d2 days one-by-one, while total men count is not 0.I don't understanddo i output 0 ,if on same days diggers don't work ?
 
 
 Edited by author 30.12.2011 01:10
2 3 9ans.: 1 1 1 1 1 1 0 0 0
 NOT simple 1 1 1 1 1 1
Question removed
 Edited by author 15.03.2010 03:09
 | 
 | 
|