Show all threads Hide all threads Show all messages Hide all messages |
Could you explain some moments in this problem? | roman velichkin | 1650. Billionaires | 1 Jun 2022 13:12 | 1 |
Is there possible such test: 1 A aa 10 1 1 1 A bb ? If then, what correct solution will be: 'aa 1' or 'aa 1, bb 1'? k - is it a day when person comes to city? Or it is a day when he goes to that city - so person comes in this city on next day? Why in example 25 days, but result has only 20 days? If two cities have same largest amount of money then it shouldn't be counted? Edited by author 02.06.2022 13:52 |
wa16 | YDZz | 1650. Billionaires | 30 Nov 2019 20:07 | 2 |
wa16 YDZz 27 Sep 2019 22:13 consider about “list are not decreasing” good point for wa16 i was answering for 0 days |
wa5 in c# | reshke'` | 1650. Billionaires | 30 Apr 2018 01:57 | 1 |
use StringComparison.Ordinal to sort cityes |
Wonderful problem | vgu | 1650. Billionaires | 18 Jan 2014 15:32 | 3 |
Big thanks to author. This is my favourite problem ;) This is Dynamic BD problem. What structers are used? I used set<pair(money,numer)>(red-black tree) and finding,deleteng and inserting of data on each milliarders going, but of course there is more effective solution. SegmentTree did the trick for me |
test #1 | AntiBug | 1650. Billionaires | 7 Dec 2013 02:39 | 2 |
Can anyone explain me test #1; London keeps 1st from day 12 to 21 (10 days) and 23 to 25 (3 days). Day 22th London = StPetersburg (=15b). Why output is London 14? The leaders are: 1- 1 London 2- 5 [tie] 6-10 Anadyr 11-11 Moscow 12-15 London 16-20 London 21-21 London 22-22 [tie] 23-25 London It seems you missed day 1. |
tests not full | alp | 1650. Billionaires | 7 Mar 2012 12:13 | 2 |
Test 1 M Gor 1000000000 10 1 2 M Goro Ac program: Goro 8 Gor 2 It's wrong:) Your test was added. And you are the only author who doesn't pass it. :) |
Test that helped me | ibra (TNU) | 1650. Billionaires | 9 Jan 2012 02:59 | 1 |
2 a ca 10 b cb 20 10 0 right answer is cb 10 Good luck! |
Clarification | Vedernikoff Sergey (HSE: EconomicsForever!) | 1650. Billionaires | 8 Jan 2012 23:50 | 3 |
Clarification Vedernikoff Sergey (HSE: EconomicsForever!) 1 Nov 2008 16:41 What to do if several cities tie first place? Do we count every of them as a recordsmen or nobody gets this status? It seems to me, that we have this case in first test in example at days 2..5. When several cities are leaders, there is no leader Edited by author 08.01.2012 23:50 |
I've got TLE with heap | Mr.Arsalan | 1650. Billionaires | 18 Dec 2011 05:10 | 7 |
It seems that the time limit for this problem is so tight, because I used heap + set and map and I got TLE. Does anybody have any suggestions? Edited by author 22.01.2009 17:08 I've used almost the same structures and AC. Try to optimize your program. Do you use scanf()/printf() for input/output? Thank for your Reply. Yeah, I used scanf/printf for IO. I think I should have reduce the number of maps in my code. I used following structures: map < string , int > city_to_index ;// locate the position of each city in the heap. map < string , string > where;// locate the city in where the billionaire is map < string , LL > how_much;// the amount of money each billionaire has map < string , int > answer;// the answers Do you have any idea to reduce them? One problem that I think that my cause TLE is that I built my heap in array and each time I update my heap I should have change the values in city_to_index. Maybe if I implement it with pointers would be better. I mean, it may be better to build the heap with pointers and for swapping the nodes their addresses in city_to_index remains unchanged. (map<string,node*> city_to_index) IT IS SOMEHOW COMPLICATED FOR ME TO IMPLEMENT IN THAT WAY, DO YOU HAVE ANOTHER IDEA? Edited by author 22.01.2009 19:23 You must before coding be sure in time and space limits of your algo. This is difficult but is core of programming skills. You take right general plan remove bags and get AC. Thanks for your advice. I had though about them before implementing my solution. and I think my running time except the part dealing with maps is O(lg n) per line of input and it is perfectly OK, and that's why I asked in forum about how to get rid of TLE. Edited by author 22.01.2009 19:36 I've reduce the number of maps in my solution and now it gives WA on test #10. Is there any tricky test cases? I used maps, set, vectors, cin & cout and my program works 0.875. There is no need in scanf(). |
Test | Popa Mihai | 1650. Billionaires | 28 Sep 2011 20:16 | 1 |
Test Popa Mihai 28 Sep 2011 20:16 Hello, Could you help me with another input data? All my tests are ok but I am taking wrong answer on the first test. Thank you, |
TLE7 C# | igorsky | 1650. Billionaires | 27 Nov 2009 14:00 | 2 |
I've reached TLE on 7th test. In my opinion this is becauce of slow Console.ReadLine() method. (aprox 2 seconds for 9999 billioners). Please give any hints. After I've added red-black tree I've got TLE9... If somebody will solve this problem using C# please contact me 1(at)igorsky.net Edited by author 27.11.2009 14:03 Edited by author 27.11.2009 14:04 |
WA5 | igorsky | 1650. Billionaires | 25 Nov 2009 17:49 | 2 |
WA5 igorsky 25 Nov 2009 17:26 I've got WA5. Could you please give some tests or hints? Thanks in advance. I've found the reason. Bug was related with case-insensetive sorting of output. |
maybe hint | Zayakin Andrey[PermSU] | 1650. Billionaires | 6 Sep 2009 05:52 | 1 |
maybe hint Zayakin Andrey[PermSU] 6 Sep 2009 05:52 money of man can be for example 1333333333, firstly i think it`s integer count of billion and get WA6 |