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 1509. Domino Recognition

1509
Posted by svr 5 Dec 2006 11:23
Problem really simple.
Use harsh criterion of koeff between max and min distances
stable for rounding ang if N=7 also number of pairs with min koeff.
Most difficult situation if N=2 and distance near
50*sqrt(2), if using rounding rooles here maybe very many tricky tests but authors kindly didn't use this opportunities.
Re: 1509
Posted by Lomir 20 Jan 2007 00:40
Yep, problem rather simple, but i made more then 30 submission before AC, and fully rewrited my program 3 times.
Also there are something strage with the precision.
Re: 1509
Posted by Fyodor Menshikov 21 Jan 2007 15:47
Lomir wrote 20 January 2007 00:40
Also there are something strage with the precision.

Yes, there are strange things with precision. After normalizing max distance to 1, not all metrics worked:

sum of absolute values of differences between corresponding distances -> ac

sum of squares of differences between corresponding distances -> wa8

maximum of absolute values of differences between corresponding distances -> wa8
Re: 1509
Posted by Fyodor Menshikov 21 Jan 2007 15:55
Lomir wrote 20 January 2007 00:40
problem rather simple, but i made more then 30 submission before AC

I made exactly 30 submissions before AC. I think this number is standard for this problem. :-)
Re: 1509
Posted by svr 21 Jan 2007 23:29
I think that float numbers troubles tipical thing.
For float math lows don't satisfies and result depend on
algorithm when for right math result dosn't depend on and we can use different algos. It's humor then men play with epsilon  trying to ajust to tests list.