What is the difference between clear() and fill()

Правка en1, от S.P.A.R.K, 2021-05-25 09:44:03

I was trying to solve 1529C - Parsa's Humongous Tree.

i used the below code which gave memory limit exceeded.

117290969

then i used fill() instead of clear() function which was also used in the tutorials. And i got my soln ac.

117291317

I used clear() in first code whereas fill() in the later one. WHAT IS THE DIFFERENCE BETWEEN THOSE TWO??

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский S.P.A.R.K 2021-05-25 09:44:03 418 Initial revision (published)