Editorial for VQ12 Giáo sư Chaos

Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.


Submitting an official solution before solving the problem yourself is a bannable offence.
  • Từ số vi rút ban đầu ~a~, qua một ngày lượng ~a~ mới sẽ là ~ a = max\{0, min\{a \times b – c, d\} \}~

  • Giá trị ~a~ sẽ tăng dần tới ~d~ hoặc giảm dần về ~0~,

  • Nếu khi chuyển sang ngày mới ~a~ không thay đổi thì từ đó trở đi ~a~ không thay đổi.

  • Như vậy ta chỉ cần tính và lưu giá trị của ~a~ trong ~d~ ngày đầu tiên. Nếu ~k \leq d~ thì tra cứu kết quả từ bảng đã lưu. Nếu ~k > d~ – kết quả giống ngày ~d~.


Comments

Please read the guidelines before commenting.


There are no comments at the moment.