Технокубок 2020 - Ознакомительный Раунд 4
06:39:54 |
Codeforces Round #605 (Div. 3)
10:09:54 |
Technocup 2020 - Elimination Round 4
2 өдрийн дараа |
Codeforces Round #606 (Div. 1, based on Technocup 2020 Elimination Round 4)
2 өдрийн дараа |
Codeforces Round #606 (Div. 2, based on Technocup 2020 Elimination Round 4)
2 өдрийн дараа |
Codeforces Round #607 (Div. 1)
3 өдрийн дараа |
Codeforces Round #607 (Div. 2)
3 өдрийн дараа |
Codeforces Round #608 (Div. 2)
3 өдрийн дараа |
Codeforces Global Round 6
5 өдрийн дараа |
Educational Codeforces Round 78 (Rated for Div. 2)
7 өдрийн дараа |
Codeforces Round #609 (Div. 1)
9 өдрийн дараа |
Codeforces Round #609 (Div. 2)
9 өдрийн дараа |
Educational Codeforces Round 79 (Rated for Div. 2)
15 өдрийн дараа |
Good Bye 2019
17 өдрийн дараа |
A2. Collective Mindsets (medium)
хугацааны хязгаарлалт 1 секунд
санах ойн хязгаарлалт 256 мегабайт
оролт стандарт оролт
гаралт стандарт гаралт
Way to go! Heidi now knows how many brains there must be for her to get one. But throwing herself in the midst of a clutch of hungry zombies is quite a risky endeavor. Hence Heidi wonders: what is the smallest number of brains that must be in the chest for her to get out at all (possibly empty-handed, but alive)?
The brain dinner night will evolve just as in the previous subtask: the same crowd is present, the N - 1 zombies have the exact same mindset as before and Heidi is to make the first proposal, which must be accepted by at least half of the attendees for her to survive.
Оролт
The only line of input contains one integer: N, the number of attendees (1 ≤ N ≤ 109).
Гаралт
Output one integer: the smallest number of brains in the chest which allows Heidi to merely survive.
Орчуулсан: [орчуулагдаж байгаа]
Жишээ тэстүүд
Оролт
1
Гаралт
0
Оролт
3
Гаралт
1
Оролт
99
Гаралт
49