I had also problems with this problem.
In fact, there is a bug in the problem specification (or in tests). There is a test case where d == 0. Try assert (d>=1). For this case the answer should be s-1.
Search found 9 matches
- Sun Oct 12, 2003 6:07 pm
- Forum: Volume 101 (10100-10199)
- Topic: 10170 - The Hotel with Infinite Rooms
- Replies: 20
- Views: 12419
- Tue Oct 07, 2003 6:00 pm
- Forum: Other words
- Topic: Regional Warmup Contest Shifted to 5th October
- Replies: 7
- Views: 2715
- Mon Oct 06, 2003 11:06 pm
- Forum: Other words
- Topic: Regional Warmup Contest Shifted to 5th October
- Replies: 7
- Views: 2715
- Wed Oct 01, 2003 11:44 pm
- Forum: Volume 105 (10500-10599)
- Topic: 10552 - Genealogical Research
- Replies: 4
- Views: 2403
- Wed Oct 01, 2003 9:12 pm
- Forum: Volume 105 (10500-10599)
- Topic: 10552 - Genealogical Research
- Replies: 4
- Views: 2403
10552 - Genealogical Research
Hi
What's the output for:
BIRTH John Doe : January 7, 1599: Adam Doe : Jane Doe
BIRTH Casper Ghost : Jan 2, 1959 : Mary Worth : John Doe
ANCESTORS Casper Ghost
BIRTH Mary Worth : May 18, 1666:Jane Doe : Adam Doe
DEATH Mary Worth : Jan 3, 1959
DESCENDANTS John Doe
QUIT
I can not solve this ...
What's the output for:
BIRTH John Doe : January 7, 1599: Adam Doe : Jane Doe
BIRTH Casper Ghost : Jan 2, 1959 : Mary Worth : John Doe
ANCESTORS Casper Ghost
BIRTH Mary Worth : May 18, 1666:Jane Doe : Adam Doe
DEATH Mary Worth : Jan 3, 1959
DESCENDANTS John Doe
QUIT
I can not solve this ...
- Sun Sep 21, 2003 7:30 pm
- Forum: Volume 105 (10500-10599)
- Topic: 10532 - Combination! Once Again
- Replies: 15
- Views: 8005
- Fri Sep 19, 2003 6:12 pm
- Forum: Volume 105 (10500-10599)
- Topic: 10532 - Combination! Once Again
- Replies: 15
- Views: 8005
10532 WA
Could somebody give me carrect output for this input? I am really mad about this problem. What's the trick?
4 1
1 1 2 2
2
5 2
1 2 3 4 5
2 1
4 1
1 2 3 4
2
1 0
1
5 2
1 2 2 2 5
0 1
50 50
1 2 2 2 2 2 2 3 3 3 4 2 1 2 3 4 5 6 7 9 50 1 2 3 4 2 1 2 3 2 2 5 9 8 5 4 3 2 9 49 29 24 2 2 6 9 9 9 9 9
1 2 ...
4 1
1 1 2 2
2
5 2
1 2 3 4 5
2 1
4 1
1 2 3 4
2
1 0
1
5 2
1 2 2 2 5
0 1
50 50
1 2 2 2 2 2 2 3 3 3 4 2 1 2 3 4 5 6 7 9 50 1 2 3 4 2 1 2 3 2 2 5 9 8 5 4 3 2 9 49 29 24 2 2 6 9 9 9 9 9
1 2 ...
- Thu Sep 18, 2003 8:58 pm
- Forum: Volume 105 (10500-10599)
- Topic: 10535 - Shooter
- Replies: 25
- Views: 56337
O(nlogn)?
Is it possible to get O(nlogn) for this problem? I got acc but my program runs extreamly slow (nearly 5sec) and I have only O(n^2). I would be grateful for any hint 

- Fri Sep 12, 2003 1:13 pm
- Forum: Other words
- Topic: receiving all messaged from one forum
- Replies: 1
- Views: 1146
receiving all messaged from one forum
Is it possible to receive all messages from chosen forum(s) on email?
Is it possible to send messages by email instead of using this website?
If yes, how to do it?
cauchy
Is it possible to send messages by email instead of using this website?
If yes, how to do it?
cauchy