Editorial for Loại bỏ để lớn nhất


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.

Bài này rất đơn giản, các bạn để ý sẽ thấy:

  • Các số 0 khi nhân vào thì kết quả sẽ bằng 0

  • Các số âm khi nhân vào sẽ đảo dấu kết quả

Ta chỉ cần loại các số 0, sau đó sẽ đếm số lượng số âm, nếu số lượng số âm lẻ thì ta loại thêm 1 số là xong!!!

"Đấy là còn chưa có bẫy nha!!!"



Comments

There are no comments at the moment.