## Search found 6 matches

Thu Jun 14, 2007 8:52 am
Forum: Volume 112 (11200-11299)
Topic: 11228 - Transportation system.
Replies: 30
Views: 13345
Sorry to disappoint, but I'm not the perfect problem setter. In fact, there are a number of great problem setters in this online judge, none of them is perfect, I think. We actually tried to make the problem descriptions as easy to interpret as possible, specially given the fact that English is not ...
Mon Jul 26, 2004 4:41 am
Forum: Volume 106 (10600-10699)
Topic: 10616 - Divisible Group Sums
Replies: 39
Views: 19467
My approach was based on modular arithmetic property: (a + b) mod m = a mod m + b mod m After that, I only used the DP algorithm for the knapsack problem to calculate in how many ways one can build the sums of at most D-1, counting how many numbers I used in each sum. The answer is the number of sum...
Tue Jan 27, 2004 7:55 pm
Forum: Volume 106 (10600-10699)
Topic: 10616 - Divisible Group Sums
Replies: 39
Views: 19467
I got accepted with only that change.

Thanks!

Herbert M. Duarte
Mon Jan 26, 2004 7:59 pm
Forum: Volume 106 (10600-10699)
Topic: 10616 - Divisible Group Sums
Replies: 39
Views: 19467
rotoZOOM, thank you for posting the answer for that input. My program produces the same output, but I believe it got WA because of the modulo of negative numbers (which I didn't realize it was negative) - thanks subbu for that. When they put the problem in the online judge, I will probably get an AC...
Mon Jan 26, 2004 4:26 am
Forum: Volume 106 (10600-10699)
Topic: 10616 - Divisible Group Sums
Replies: 39
Views: 19467
Hello, Per. I have considered negative values and took the value of every number mod d. However, my implementation wasn't accepted :cry: . Could you please post the answer for the following input. Thanks a lot. 10 2 1 2 3 4 5 6 7 8 9 10 5 1 5 2 5 1 2 3 4 5 6 6 2 5 3 2 3 4 5 6 7 1 7 2 7 3 3 2 3 3 4 6...
Sat Jan 24, 2004 7:46 pm
Forum: Volume 106 (10600-10699)
Topic: 10616 - Divisible Group Sums
Replies: 39
Views: 19467

### 10616 - Divisible Group Sums

Hello, everybody.

Can anyone tell me if there is any tricky input for this problem. I solved it using DP and tested it for a lot of different inputs, even invalid ones, and to me everything seemed right. I got frustated because it wasn't accepted during the contest.

Thanks.
Herbert M. Duarte