why my approach is always wrong

Правка en1, от mac_n_cheese_pog, 2021-08-08 15:39:46

https://mirror.codeforces.com/contest/810/problem/B see this problem and see my code https://pastebin.com/U3p3vCwD

my approach: i make pair,find maximum v[i].first and then check if second is >0 then multiply it.

if u dont understand my code just try to analyze my code.i think its pretty straightforward.

Теги #greedy

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский mac_n_cheese_pog 2021-08-08 15:39:46 340 Initial revision (published)