|
|
Show all threads Hide all threads Show all messages Hide all messages | Strange approach | andreyDagger | 1483. Table Football | 8 Jun 2022 21:18 | 2 | It's obvious that answer for first team is n - 1 How to get answer for second team. Of course total number of points do not exceed 3 * (n * (n - 1) / 2), because we played n * (n - 1) / 2 matches, and in every match summary points not exceed 3. Assume looser team got k points, that mean that total number of points >= k * n. But k * n can't be greater than 3 * n * (n - 1) / 2, so: k * n <= 3 * n * (n - 1) / 2, then k <= 3 * (n - 1) / 2. Answer is 3 * (n - 1) / 2. But how to prove that we can make such competition where k is the smallest value and we have (n - 1) values that are not less? Edited by author 08.06.2022 21:21 | what is the answer for n=3 and n=4? | THE_SCORPION | 1483. Table Football | 12 Aug 2008 13:52 | 7 | Good question. Unreal problem ..?? 3>> 2 3 4>> 3 4 15>>14 21 Edited by author 07.10.2006 20:21 if all matches finish with draw, all teams must have n-1 points. If there are 3 teams answer is 2 2. Is it true?? if all matches finish with draw, all teams must have n-1 points. If there are 3 teams answer is 2 2. Is it true?? No correct Answer for 3 is 2 3 because if 1 win 2 if 2 win 3 if 3 win 1 they all have 3 points | To Authors! | Kaliningrad SU -J_A_MES-HeadLiner | 1483. Table Football | 27 Jul 2008 00:05 | 2 | To Authors! Kaliningrad SU -J_A_MES-HeadLiner 7 Oct 2006 16:33 Osliki and T34 must get min and max simultaneously in one game? | Hint for this problem | BigBin | 1483. Table Football | 25 Jul 2008 14:16 | 1 | You must know score of Ural SU Osliki and Ural SU T34 team is not simultaneously in one game. For the first team. If they play all game with draw so the winner have n-1 scores. For the second team. The best scores is all team is win in n/2 games so the second team have (n-1)/2*3 scores but if n is even so it have one game for draw. for n is even = (n-1)/2*3 + 1 for n is odd = (n-1)/2*3 *sorry for bad english | The algo is easy, but the idea is not quite...(-) | SPIRiT | 1483. Table Football | 24 Feb 2008 13:21 | 8 | 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. So, what is your algo, svr? After building your matrix, what are you doing? Thanks. Edited by author 17.10.2006 13:53 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. First number is always : (n - 1). Second if n even => 3 * ((n - 2) / 2) + 1 If n odd => 3 * ((n - 1) / 2) 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? 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 | Help | Player | 1483. Table Football | 22 Jan 2008 14:51 | 7 | Help Player 7 Oct 2006 15:43 Could someone please post the output for n=4 ? Cause the problem is not very specific. All matches could be draws and then... But it appears that's not possible. Why not? Re: Help Ivan Filatov (OrenburgSU) 7 Oct 2006 15:49 I don't think so. That's like asuming all matches are draws. I've tried this solution and it doesn't work. n==4 4 3 But we got WA 3 !! Re: Help Seyyed Mehran Kholdi 22 Jan 2008 14:51 Please read the statement of the problem; you have to determine the MAXIMUM points of team2 and MINIMUM point of team 1. Edited by author 22.01.2008 14:53 Re: Help Seyyed Mehran Kholdi 22 Jan 2008 14:51 Edited by author 22.01.2008 14:51 | The shortest program | awpris | 1483. Table Football | 10 Jan 2007 01:03 | 2 | NO(-) Roma Labish[Lviv NU] 10 Jan 2007 01:03 | ??? | Kaliningrad SU -J_A_MES-HeadLiner | 1483. Table Football | 28 Nov 2006 21:19 | 2 | ??? Kaliningrad SU -J_A_MES-HeadLiner 7 Oct 2006 16:27 Can first number <> second number? I can't understand this task )= why output n-1 twice isn't right? | n = 1 | Daniel | 1483. Table Football | 7 Oct 2006 16:04 | 6 | n = 1 Daniel 7 Oct 2006 14:50 if n=1, the answer should be 0 0 or not? Theoretically yes. But the problem statement says that the teams Osliki and T34 are participating. That's 2 teams. Can they all play draw??? | Problem D | Player | 1483. Table Football | 7 Oct 2006 14:50 | 1 | Can N be 1? Shouldn't be at least 2 teams? |
|
|
|