11041 - Quarter-Finals with Brazil!? No!!!
Moderator: Board moderators
11041 - Quarter-Finals with Brazil!? No!!!
Any idea on how to solve this problem?
-
- Guru
- Posts: 1080
- Joined: Thu Dec 19, 2002 7:37 pm
It's not easy to give hints without spoiling the problem.
Use psychology: if you were playing in a knock-out competition, what kind of teams would you like to meet in which stage of the competition? The strongest teams first? Or maybe the weaker, in the hope another team knocks out the stronger teams?
Run a few simulations with a small number of teams, either by hand or write a BF program.
Getting the output right is the hardest part of the problem, IMO.
Use psychology: if you were playing in a knock-out competition, what kind of teams would you like to meet in which stage of the competition? The strongest teams first? Or maybe the weaker, in the hope another team knocks out the stronger teams?
Run a few simulations with a small number of teams, either by hand or write a BF program.
Getting the output right is the hardest part of the problem, IMO.
-
- Guru
- Posts: 584
- Joined: Thu Jun 19, 2003 3:48 am
- Location: Sanok, Poland
- Contact:
Nice problem!
My code seemed to be ok right away - it passed a set of 10^7 test cases, but still was getting WA. It took me 10 hours to find the error: using
instead of
My code seemed to be ok right away - it passed a set of 10^7 test cases, but still was getting WA. It took me 10 hours to find the error: using
Code: Select all
me -= 'A';
Code: Select all
if(isupper(me))me -= 'A';
else me = (me - 'a') + 26;
-
- Guru
- Posts: 584
- Joined: Thu Jun 19, 2003 3:48 am
- Location: Sanok, Poland
- Contact:
AC..sclo wrote:Now, I finally got AC, after I fix my tie breaking rules.
![:D](./images/smilies/icon_biggrin.gif)
This problem contains two parts.
The first part can be solve by the GREEDY strategy posted above.
And the second part is to rearrange the round tree to minimize the string.
I found that the second part is more difficult than the first part.
(It really needs a good tie breaking rule)
Re: 11041 - Quarter-Finals with Brazil!? No!!!
I first set s(our team) = 0, and sort the teams with smallest lex order.
But how can I rearrange the teams in second part? Can anyone give me some hints?
Thanks a lot !!
But how can I rearrange the teams in second part? Can anyone give me some hints?
Thanks a lot !!