ICPC WF Moscow Invitational Contest - Online Mirror (Unrated, ICPC Rules, Teams Preferred)

Solutions are presented as using the least memory and the fastest execution time. It also takes the top 10 most recent solutions from each language. If you want to limit to a specific index, click the "Solved" button and go to that problem.

ContestId
Name
Phase
Frozen
Duration (Seconds)
Relative Time
Start Time
1578 ICPC WF Moscow Invitational Contest - Online Mirror (Unrated, ICPC Rules, Teams Preferred) FINISHED False 18000 104172863 Oct. 1, 2021, 1:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 40 ) G Game of Chance PROGRAMMING math probabilities

B"The King wants to marry off his daughter, and he wants her husband to have the greatest innate luckiness possible. To find such a person he decided to hold a heads-or-tails tournament. If person A with luckiness x and person B with luckiness y play heads-or-tails against each other, person A wins with probability x/(x+y) . The tournament has several rounds. Each round some participants are split into pairs. Each pair plays against each other, and the loser leaves the tournament. The participants are numbered from 1 to n . During the first round, a number k ( 1 <= k <= n ) is selected such that n-k/2 is a power of 2 (such k always exists and is unique). Only participants numbered from 1 to k take part in the first round. It ensures that in all other rounds the number of participants is the power of 2 . During other rounds, all the participants who still have not left the tournament take part. If during some round, participants numbered p_1 < ldots < p_{2m} take part, then they are split into pairs in the following manner: participant p_{2i-1} plays against participant p_{2i} for each i from 1 to m . The rounds are held until only one participant is left. He is declared the winner of the tournament and he will marry the King's daughter. The princess can't wait to find out who is her future husband. She asked every participant to tell her his luckiness. Assuming they did not lie, she wants to know the probability of each participant winning the tournament. As you are the best friend of the princess, she asks you to help her. The first line of the input contains the number of participants, n ( 2 <= n <= 3 cdot 10^5 ). The second line of the input contains n integer numbers, a_1, ldots, a_{n} ( 1 <= a_i <= 10^9 ). The luckiness of the i -th participant equals to a_i . Print n number"...

Tutorials

Tutorial (PDF)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
130520170 medium_waxberry G Oct. 2, 2021, 4:22 a.m. OK GNU C++14 TESTS 76 3088 24473600
130476198 Fulisike Miracle03 Retired_MiFaFaOvO G Oct. 1, 2021, 2:51 p.m. OK GNU C++17 TESTS 76 2152 120217600
130514198 hos.lyric G Oct. 2, 2021, 1:59 a.m. OK GNU C++17 (64) TESTS 76 1154 40345600
130514183 hos.lyric G Oct. 2, 2021, 1:58 a.m. OK GNU C++17 (64) TESTS 76 1325 40345600

remove filters

Back to search problems