| Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения |
| easy bfs | 👑TIMOFEY👑 | 1419. Карта мира 40 островов | 14 авг 2024 00:44 | 3 |
|
| Formal statement | andreyDagger`~ | 1652. Банковский кризис | 13 авг 2024 22:43 | 1 |
Given weighted undirected graph, every vertex has its country "C[v]" and money "V[v]". Let's call vertex "v" "responsible" if there exist at least one edge (v, u, cost) where C[v] == C[u]. Also, you can do this operation infinitely many times: Choose edge (v, u, cost), delete it, and add edge (k, u, cost), where C[u] == C[k] and u != k. After this operation make subtraction V[k] -= cost (of course after this operation V[k] must be >= 0). You need to maximize number of responsible vertices Edited by author 14.08.2024 13:04 |
| what's the meaning of the problem? | HybridTheory | 1327. Предохранители | 13 авг 2024 18:46 | 7 |
What it ask us to do? Who can explain me the work. Thanks. It isn`t anything complex . It gives u the beginning and ending of an interval : A and B and wants you to calculate how many digits in this interval ( including the numbers A and B ) are odd. So u see it is just as simple. Good luck. Edited by author 17.10.2004 21:12 What if a=1 and b=1? Should the answer be 1? Your explanation seems to be right, as my code was accepted. But I just can't bring it together with the original problem. I can't figure out, how it asked for all odd figures in an interval. :D Of course, thank you... Edited by author 13.08.2024 18:47 Edited by author 13.08.2024 18:47 |
| if you have RE19 | ~'Yamca`~ | 1367. Конфиденциально! | 12 авг 2024 21:26 | 1 |
|
| Where am I wrong? | alnkapa | 1214. Странная процедура | 12 авг 2024 03:23 | 2 |
#include <iostream> #include <algorithm> int main() { int x, y; std::cin >> x >> y; if ((x + y) & 1) { std::swap(x, y); } std::cout << x << " " << y << "\n"; return 0; } What would happen, if (x>0 && y>0) is not true? |
| Wa 6 (playing with precision) | FaNato4kA_TiMoFeYa | 1316. Биржа | 12 авг 2024 01:02 | 1 |
Use this two tips: 1) int x = (int)(t * 100 + 0.0000001); // for input 2) cout << setprecision(100); // for output Good luck :) |
| Wa 8 and some thoughts about this task | FaNato4kA_TiMoFeYa | 1371. Грузоперевозки | 11 авг 2024 23:57 | 1 |
If you have wa8, check precision, maybe this will help you. Finally, I did setprecision(100) and get ac. Btw, this task can be solved with one dfs without rerooting. |
| The solution is much simplier than I thought | 0bla4ko | 1220. Stacks | 10 авг 2024 21:10 | 1 |
I tried a lot of variations of self-made stacks but all of them failed. Then I just used 1000 std::stacks with Visual C++ 2022 compiler (not x64) and it worked, using only 640 KB of memory. |
| Hint | coolboy19521 | 1371. Грузоперевозки | 7 авг 2024 16:16 | 1 |
Hint coolboy19521 7 авг 2024 16:16 Most probably could be solved with centroid decomposition (didn't think much but have some ideas). But my solution is with tree dp with top to bottom dfs and bottom to top dfs. Some call is "rerooting". |
| Hint | coolboy19521 | 1709. Пингвин-Авиа | 7 авг 2024 15:25 | 1 |
Hint coolboy19521 7 авг 2024 15:25 Use long type (anything 64 bit) MST |
| Hint | coolboy19521 | 1160. Network | 7 авг 2024 15:02 | 1 |
Hint coolboy19521 7 авг 2024 15:02 |
| Hint | coolboy19521 | 1272. Метро не в Екатеринбурге | 7 авг 2024 13:23 | 1 |
Hint coolboy19521 7 авг 2024 13:23 It ain't a problem to include all the tunnels because apparently they have no cost. So include all of them and then count the number of connected components (let's call it l). The answer is not dependent to the bridges. It is just l-1. |
| Hint | coolboy19521 | 1280. Topological Sorting | 7 авг 2024 13:12 | 1 |
Hint coolboy19521 7 авг 2024 13:12 Just check if the condition for the i-th node is correct in the given order. That's it. ~8 lines or something. |
| Hint | coolboy19521 | 1022. Генеалогическое дерево | 7 авг 2024 13:00 | 1 |
Hint coolboy19521 7 авг 2024 13:00 |
| Hint | coolboy19521 | 1136. Парламент | 7 авг 2024 12:08 | 1 |
Hint coolboy19521 7 авг 2024 12:08 If you are unfamiliar, I recommend to google binary search trees. |
| Easier than 1444, I think, but overrated | FaNato4kA_TiMoFeYa | 1173. Lazy Snail | 6 авг 2024 23:39 | 1 |
|
| wa 3, 5 | 👑TIMOFEY👑`~ | 2009. Очереди в столовой | 6 авг 2024 22:34 | 1 |
wa 3, 5 👑TIMOFEY👑`~ 6 авг 2024 22:34 queues dont equal length like 1 2 3 4 and next person want to insert between 1 and 2, you dont let him to do that |
| wa4 | 👑TIMOFEY👑`~ | 1755. Торт | 6 авг 2024 20:43 | 1 |
wa4 👑TIMOFEY👑`~ 6 авг 2024 20:43 |
| Hint | coolboy19521 | 1106. Две команды | 5 авг 2024 22:53 | 1 |
Hint coolboy19521 5 авг 2024 22:53 |
| WA test 3 why? | ololo | 1950. Дачи на Марсе | 5 авг 2024 22:32 | 5 |
I have same problem. See you'v done it. What's wrong? Give please same tests. You solved problem. Thanks. Edited by author 17.08.2015 12:01 Edited by author 17.08.2015 12:01 7.503 2.501 ans: 25.000003 |