“\n” is better than endl
why are u posting abt problems of ongoing contests and tagging others
who cares abt how u solved a problem???
people will figure out everything on their own
@ashokshaun when constraints fit the time limit in such a way that even [endl Vs “\n”] matters posting such questions and tagging relevant people matters right : ) . So no one is discussing algorithm related to ongoing contest problems here. Happy coding.
i understand ur concern…but when i commented ,someone discussed their approach in the comments(maybe its deleted now)…so i wrote that comment and not to offend anyone
u can make a post saying how useful is \n but mentioning the particular problem and context is not a very good thing in my opinion…
no… this happens many times …not just here …even in other problems and other contests…so
“\n is not just \n”
its so powerful
I got used to endl so I didn’t know that endl vs “\n” matters. Yeah realized today
i got tle so many times and sometimes even system tests failed just because of endl
so these days whenever i write in c++
i always write
#define endl “\n”
yeah it works
#define endl '\n'
I used to think that using keywords as macros flags an error but that’s a wrong perception
Now I don’t have to change my habit
I disagree. Why are you posting this publicly ?
Ask in comments section. If found appropriate then they will change time limits.
endl vs \n is a very common and known optimization. You are expected to know this.
Especially for 6th que of long challenge.
@l_returns Yep, I’ll not repeat this