| № | Пользователь | Рейтинг |
|---|---|---|
| 1 | Benq | 3676 |
| 2 | Kevin114514 | 3659 |
| 3 | jiangly | 3640 |
| 4 | turmax | 3450 |
| 5 | tourist | 3408 |
| 6 | strapple | 3360 |
| 7 | Um_nik | 3354 |
| 8 | squareOf105 | 3348 |
| 9 | maroonrk | 3312 |
| 10 | idontwannadothis…e | 3191 |
| Страны | Города | Организации | Всё → |
| № | Пользователь | Вклад |
|---|---|---|
| 1 | Qingyu | 154 |
| 2 | nik_exists | 151 |
| 3 | maspy | 149 |
| 4 | AmShZ | 146 |
| 5 | Um_nik | 143 |
| 6 | Errichto | 139 |
| 7 | BledDest | 136 |
| 8 | adamant | 135 |
| 9 | maroonrk | 133 |
| 10 | cry | 130 |
|
0
I believe it is because they are asking you to place fishes such that a random net has the highest expected value. In the given example, the expected value is 2 because there are 4 possible net positions and those net positions capture 8 fish --> Expected value = (total fish) / (net positions) = 8/4 = 2. If you place the fish like you said at (1,1) (2,1) (2,2) it is true that the first net position (top left) will contain three fish. However, you will see that because of this the other net positions will contain 1, 2, and 1 fish. Then total fish = 3 + 1 + 2 + 1 = 7. Expected value = 7/4 which is less than 2 so this placement is not maximizing the expected value. |
|
0
The problem statement says you are not allowed to put more than one fish per cell. |
|
+3
Am I getting this logic right for Problem B?
Is this logic correct? I think I am still getting TLE because I am not using Binary Search. I got a bit lost in the editorial starting at step 3. |
|
0
Thanks, your explanation was very clear. I'm still having trouble with the "Every component will be a connected group" part. How do you represent these groups? For example if 1 is friends with 2 3 4, then my adjacency lists look like:
But if I DFS starting with every node, I will find the minimum, but I will be quadruple counting this one group. Sorry if this seems silly, I am pretty new to graph problems. |
|
0
Can someone elaborate on solving Problem C. I understand that if we find the minimum of each group, it will give us the minimum gold in order to spread the rumor. However, how can we turn the list of pairings we are given as inputs into groups? |
|
0
whups, what a silly mistake, thanks! |
|
0
For Problem B: I have read and understood the editorials and I am trying to implement the solution but am getting the wrong answer, can someone assist me. Here is my logic:
Is there something wrong with this logic? edge cases? I have been trying for a few hours now and I can't figure out whats wrong. |
| Название |
|---|


