Skip to main content

Posts

Showing posts from March, 2023

Codeforces Round 857 Problem B(Settlement of Guinea Pigs) solution c++

  Codeforces Round 857 (Div. 2)                                              B. Settlement of Guinea Pigs   Dasha loves guinea pigs very much. In this regard, she decided to settle as many guinea pigs at home as possible and developed a plan for the next n  days. Every day, she will either buy a new guinea pig or call a doctor to examine all her pets. Unfortunately, the store where she was going to buy guinea pigs does not understand them. Therefore, it cannot determine their gender. Dasha can't do it either. The only one who can help is a doctor. To keep guinea pigs, aviaries are needed. Dasha plans to buy them in the same store. Unfortunately, only one species is sold there — a double aviary. No more than two guinea pigs can live in it. Since Dasha does not want to cause moral injury to her pets — she will not settle two guinea pigs of d...