Editorial for Làm Nóng


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.

Đầu tiên, ta sắp xếp lại các tảng băng, ưu tiên nhiệt độ giảm dần. Sau đó, ta duyệt tuyến tính các tảng băng theo thứ tự sắp xếp. Nếu tảng bảng thứ \(i\) có giá trị tuyệt đối của nhiệt độ (\(abs(t_{i})\)) lớn hơn giá trị nhiệt độ hiện tại của thiết bị làm nóng thì ta thực hiện hành động cắm điện, ngược lại ta thực hiện hành động phá tảng băng đó.



Comments

There are no comments at the moment.