| Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения |
| 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 | Hououin`~`Kyouma | 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 |
| wa 1,2,3, ..., 12 | 👑TIMOFEY👑`~ | 1159. Fence | 5 авг 2024 21:32 | 1 |
"If it is not possible to construct the fence from the specified blocks, write 0.00." - dementia binary search from the maximum side across the floors to infinity is a bad idea - a ternary search is better suited, it can be run over all segments equal in length to the root from infinity, and also for prevention it is worth adding a few additional random segments (about 10,000) I would highlight a few good infinities such as 5e6, 1e8, 1e10, 1e6, 1e5, 2.625e6 The order of the walls is not important #define ld long double ld arcsin(ld k) { if (k >= 1) { k = 1; } if (k <= -1) { k = -1; } return asinl(k); } (I hope you won't need this feature.) i think 1e-10 nice eps, but i dont sure |
| If u have WA#45 | Keworker `~ | 1809. Чапаев и картошка | 4 авг 2024 12:19 | 1 |
Test 45 requires no changes. Just print input data in this case. |
| wa13 mle 15 | 👑TIMOFEY👑`~ | 1570. Ужин на 45 этаже | 3 авг 2024 16:04 | 1 |
use bitsets for quick restoring the answer |
| WA29 | 0bla4ko`~ | 2141. Саша Вилкин | 2 авг 2024 23:40 | 1 |
WA29 0bla4ko`~ 2 авг 2024 23:40 Check if your code works correctly if there is only one meal in the restaurant 1 1 answer: 1 1 -1 answer: 0 |
| Overrated | Keworker `~ | 1440. Расписание тренировок | 1 авг 2024 10:46 | 1 |
Just realization problem, really easy. Rating is too big. |
| Overrated | Keworker `~ | 2074. Классификатор Тимуса | 1 авг 2024 01:29 | 2 |
Easy solution using 0.14 seconds, first try. Just realization with Python. Why rating is so big? |
| По дереву Фенвика код не робит | MuhammaDuMAr | 1028. Звёзды | 31 июл 2024 21:39 | 1 |
Здравствуйте! Может кто подсказать, почему код не работает? Специально для задачи изучил дерево Фенвика и на питоне всё равно не заработало (на 9 задаче по времени не прошло) ****************************************************** n=int(input()) mas=[0]*n xp=[0]*32002 for i in range(n): lis=list(map(int,input().split())) #Принимается на ввод пара координат if (lis[0]-1)%4==0: if lis[0]!=1: mas[xp[lis[0]]+xp[lis[0]-2]]+=1 for j in range(lis[0]+2,32002,4): xp[j]+=1 else: mas[xp[lis[0]]]+=1 for j in range(lis[0]+2,32002,4): xp[j]+=1
else: if (lis[0]+1)%4==0: mas[xp[lis[0]]]+=1 for j in range(lis[0]+4,32002,4): xp[j]+=1 else: if lis[0]%2==0: if lis[0]!=0: if lis[0]%4==0: mas[xp[lis[0]]+xp[lis[0]-1]]+=1 xp[lis[0]+1]+=1 for j in range(lis[0]+3,32002,4): xp[j]+=1 else: mas[xp[lis[0]+1]-(xp[lis[0]+1]-xp[lis[0]-1]-xp[lis[0]-3])]+=1 for j in range(lis[0]+1,32002,4): xp[j]+=1 else: mas[xp[lis[0]]]+=1 xp[lis[0]+1]+=1 for j in range(lis[0]+3,32002,4): xp[j]+=1 xp[lis[0]]+=1 for i in mas: print(i) ************************************** |
| 31 ms is achievable with just combinatorics | sweepea | 1353. Миллиардная Функция Васи | 31 июл 2024 13:38 | 2 |
If you give me your email i can send you really fun AC solution using 0,15 ms ) |