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 1483. Table Football

The algo is easy, but the idea is not quite...(-)
Posted by SPIRiT 9 Oct 2006 17:02
Re: The algo is easy, but the idea is not quite...(-)
Posted by svr 10 Oct 2006 00:55
I have Ac(0.015) by diagonal sequantal placing nambers 1..N*N from max and min alternating
25 2 22 6 2 17
1  23 5 18  10
24 4  19 9  14
3  20 8  15 12
21 7  16 11 13
but clear mathamatic proof i don't now and this is most interesting. I will try find out such proof and if people will have interest will send this proof to forum. Without proof algotithm hasn't hard foundation.
That would be interesting, I'm also trying to prove it. (-)
Posted by Michael_Rybak 10 Oct 2006 17:46
-
Re: The algo is easy, but the idea is not quite...(-)
Posted by Alexey 17 Oct 2006 13:50
So, what is your algo, svr?
After building your matrix, what are you doing?

Thanks.

Edited by author 17.10.2006 13:53
Re: The algo is easy, but the idea is not quite...(-)
Posted by svr 17 Oct 2006 14:08
If we have optimal matrix to take answer is very simple problem. We use double loop, calculate sums A[i,j]+A[i-1,j] and A[i,j-1]+A[i,j] and renew record value searching max.
Idea is very easy for this problem!
Posted by [SPbSU ITMO] MAKAPOB 11 Mar 2007 03:40
First number is always : (n - 1).
Second if n even => 3 * ((n - 2) / 2) + 1
If n odd => 3 * ((n - 1) / 2)
Yes, idea is realy very easy!
Posted by Tural Neymanov 11 Jan 2008 22:16
Yes, I have also maden by this way. My program is in 7 lines(without var,begin,end - 3).
But I don'y understand why it works in 0.015, except 0.001.
I used only 1 read and if.
strange isn't it?
Re: Idea is very easy for this problem!
Posted by Temp 24 Feb 2008 13:21
what is answer if n=8
when only one match with win&lose ,and other is draw
answer should be 6 9 (6(1)+3)?

Edited by author 24.02.2008 13:21

Edited by author 24.02.2008 13:21