Тёмный

A. Chess For Three (Explanation) - Codeforces Round 945 (Div. 2) 

X AlphA - Hard Algorithms
Подписаться 595
Просмотров 887
50% 1

Опубликовано:

 

16 май 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 7   
@cp_with_vkd
@cp_with_vkd 28 дней назад
Problem C video solution (cat, fox and double maximum) : ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-VCqEXBvxXTE.htmlsi=9obFRxs5jW8LnrNk
@questions-answered
@questions-answered Месяц назад
thanks
@gautambaranwal445
@gautambaranwal445 Месяц назад
Thanks.. :)
@bishwashkumarsah171
@bishwashkumarsah171 29 дней назад
other youtubers were just using the one liner but i couldnot understand that. ans = min(p1+p2,(p1+p2+p3)//2). can you explain this solution too that is in the editorial. Nice sol
@cp_with_vkd
@cp_with_vkd 29 дней назад
If you want the explanation for the O(1) solution, it goes like this: As, we are always increasing p1+p2+p3 by 2 (1,1 in case of draw and 2,0 in case of win), the invariant is pretty clear, i.e.., (p1+p2+p3)%2=0 for a valid game. Now, we have p1≤p2≤p3, so we can always have atleast p1 draws. Thus, from p2 and p3, we have to remove p1 points, leaving us with p2+p3−p1 points. Obviously, in the most optimal case, we could have (p2+p3−p1)/2 more draws (if we had equal points left for both), but this is not necessarily the case as it is possible that p2
@dipteshraj9169
@dipteshraj9169 23 дня назад
@@cp_with_vkd Absolutely awesome , Now I got it... couldn't understood this o(1) approach by watchinng other yt videos on internet
@user-yq5pm1cd9r
@user-yq5pm1cd9r 21 день назад
@@cp_with_vkd good job thank you
Далее
What Should Be Next? 👀🤯
00:56
Просмотров 6 млн
Problem C. Interesting sequence | Codeforces 843
16:42
Codeforces Round 164 | Painting the Ribbon
7:26
#Codeforces Round 945 Solution Discussion (with Shayan)
1:38:56