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

Revision en1, by 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??

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English S.P.A.R.K 2021-05-25 09:44:03 418 Initial revision (published)