ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1927. Herbs and Magic

Hints for WA users.
Posted by 198808xc 27 Nov 2012 17:52
1. Use integer calculation for judging if the answer is -1 or 0.
2. Use integer calculation until the last step for the area (an integer-division).
3. Use 'long long' instead of 'long' or 'int'.

Also, here are some cases which might help.

0 0 -1000 0
0 0 1000 1
1000001000.000000

-1000 0 0 1000
0 -1000 1000 -999
2002004004.004004

0 400 1000 1000
-1000 -1000 355 -187
-1

0 400 1000 1000
-1000 -1000 350 -190
0

0 400 1000 1000
-1000 -1000 353 -188
16931680400.000000

-1000 -1000 1000 1000
-1000 -1000 1000 999
31984004000.000000

-1000 -1000 1000 1000
-472 -851 379 1
5800420000.000000
Re: Hints for WA users.
Posted by 198808xc 27 Nov 2012 17:54
More tricky cases:

0 0 3 0
1 0 1 0
0

The following testcase helps me to beat WA#33.
0 0 3 0
0 1 3 1
-1

Edited by author 27.11.2012 17:54

Edited by author 27.11.2012 17:54

Edited by author 27.11.2012 17:54
Re: Hints for WA users.
Posted by Eugene Gubernatorov 5 Feb 2013 00:56
This test shouldn't be applied:
0 0 3 0
1 0 1 0
0
because it is said that window lengths are positive. And that's true, I've checked.
Or maybe a misprint?
Re: Hints for WA users.
Posted by Avtandil Goqadze chemi kvati mindaaa 13 Jul 2013 20:25
incorrect test cases
Re: Hints for WA users.
Posted by alp 14 Aug 2013 23:35
-1000 0 0 1000
0 -1000 1000 -999
2002004004.004004

i get 2002004.0040040, but accepted.