Hi everyone!
code_warrior recently asked "How is ecnerwala?" I'm here to answer that question and others you may have! I'll check this regularly for the next couple of days and try to respond when I get a chance. Ask me anything!
To code_warrior: I'm doing good. Quarantine is still ongoing, so I'm spending most of my time at home with my family, coding both for work and for fun. How about you?
EDIT: There have been a lot of repeat questions, and I've tried to answer each question at least once. I've given a bunch of general advice about practicing and training, and I don't think I can say too much about how you specifically should practice, so I might not answer all of those questions. In general, practice things that you see in contest that are medium or hard but not impossible for you.
UPDATE: Thank you guys for all your questions! I think I'm done answering questions for now, hope to compete with you guys more!
UPDATE 2: I finally followed through and posted a bunch of screencasts to my YouTube channel, check them out if you're interested! I'll look into a way to post the code/key-captures, and I hope to publish some with commentary soon!
How tall is ecnerwala?
I swear I'm pretty much 6ft (1.83m).
Everybody asks How is ecnerwala ?
Nobody asks How is alawerence ...
S E D
L Y F
how to become lgm in 3 months?
If someone could have achieved it in 3 months then it would not have been called "Legendary". P.S I am none to tell you(I am a fkin newbie) this but I think these people must be very passionate about CC.
Because he doesn't mess up the spelling of his own handle
Do you know who is "BINOD"?
Nope
What is your favourite editor??
I love vim too. JetBrains IDEs are a runner up.
What plugins do you use/recommend for competitive programming? Would it be too much to ask if you could share your .vimrc?
You can find my vimrc here: https://github.com/ecnerwala/dotfiles/tree/master/vim
The most important for competitive programming is just YouCompleteMe.
You can also find my Makefile at https://gist.github.com/ecnerwala/a3c6332ac626bc448165.
How did you handle vim in the ICPC World Finals? AFAIK, they don't let you download any plugin script. Did you write your .vimrc by hand at the beginning of the contest? Or did you just use plain old plugin-less vim?
Oh and congrats on your second place today!
I typed up this vimrc
https://github.com/ecnerwala/icpc-book/blob/master/content/contest/vimrc
wow ! Thanks for sharing ecnerwala !
Hey, the question hasn't been answered yet, so I'm asking it again.
How are you, Andrew?
I'm doing good, how about you?
Hello Sir, it's nice to be able to chat with you. Regarding the Code Jam Finals, I would like to know that don't u feel sad after losing to Tourist? Especially after working so hard for so many years? I ask this because I get disheartened too easily by failures. I also face a dilemma like how much time I should spend behind thinking about a problem..
Next Question is, what should be my strategy to prepare as a team for ICPC?
I would like to know from the community as to why this simple post has been downvoted so many times.Neither have I tried to insult anyone,nor am i asking anything irrelevant.Then why unncessarily are you downvoting me?
I would really like to know the reason so that in future I keep certain things in kind before commenting here at Codeforces
Your first question is a rather sensitive, and a bit personal question.
Well your second question can be answered with some searches on the internet. It's also a part of the strategy a team uses for the competitions. If you still want to ask such things, create a blog.
"Ratism" has nothing to do here.
I personally down-voted you for this line `
... I would like to know that don't u feel sad after losing to Tourist?
`
My ex-wife sent me the bill for the dog tax. I say hey this is your dog. She says, well, it's a breakup dog. What should I do?
pet the dog ofc
Did your rating problems begin because of your wife, dog, or both?
Yes
Seems my rating goes up again :)
why the fuck didn't you help me?
How could I have helped you? With what?
what kind of "work" do you do?
I work at a startup called Impira in SF on database-like systems to extract and query information from assets (like scanned documents) using machine learning. I'm mostly working on the low-level data storage layer to store data and make it efficient to query.
Why did you choose to work in a startup particularly? Given that you have excellent engineering background and exceptional programming skills .
Startups are usually where the most exciting work happens. They need to master the market in some new vertical and that takes hardcore programming/engineering skills. Though this may vary from startup to startup.
Do you have enough time working in parallel while studying at MIT?
What's your next big goal?
One goal I have is to start streaming or screencasting more competitive programming content. I'll be posting some screencasts (probably AGC047 and CF R663 Div2) to YouTube shortly, and make sure to follow me at https://twitch.tv/ecnerwala to see when I go live!
What is your training routine to get better?
Recently, I haven't had much of a strict training routine; I mostly do programming problems when I feel like it (which admittedly is pretty often). I do try to upsolve most of the problems from all the contests I do, but even then I skip annoying/"uninteresting" problems.
In high school, I did a lot of POI (Polish) problems.
what did you do when you were stuck in some POI problem and tried enough (as there's no editorial) and what should the others do now ( considering the resources available today if any )?
there are editorials in polish with reference solutions
By no editorial I meant english editorial actually
What does "ecnerwala" mean? And how do you pronounce it?
Well I can answer this : D it's the reverse of his last name
It's the reverse of my middle name (my full name is Andrew Lawrence He). I pronounce it like "eck" (hard-k) — "nerwhal" (rhymes with narwhal) — "ah".
Omg, I just realized that I was reading your handle as "echerwala" all this time.
Omg, I just realized that I was reading his handle as "encerwala" all this time.
anybody who read it like e-c-ner-wala ?
/ɪkˈnɝːwələ/
How do you solve https://codeforces.net/contest/1375/problem/F?
I wish I knew.
How to improve? What difficulty level problem should I solve to reach purple ?
I think most of improving is practicing implementing and building familiarity with concepts. It's hard to say what difficulty level problem. I think to practice implementing, try to implement something that complicated enough that you'll make bugs, and then try to build muscle memory or other techniques to avoid those bugs. To learn concepts, probably try to solve problems that take you between 20 minutes and a few hours to solve.
Also, reaching purple may not be the right goal; you'll probably want to set a short-term goals that are more incremental.
you are a legendary coder ....i think you get many offer from Google/Facebook or many big tech company's share some interesting idea about that ....
I don't have too much to say about that; there are a lot of resources online if you want to learn about these things. I will say that competitive programming problems are pretty similar to the programming problems I've seen in interviews, so it's definitely a helpful bit of experience to have.
Q1. can ecnerwala defeat tourist in google code jam finals ?
Q2. is ecnerwala belongs to china or any background history with china ?
where do you live Legendary Grandmaster?
I live in California, USA.
What do your cp practicing sessions look like? How do you work on problems (stuff like thinking for >30 mins, reading editorial afterwards, then implementing stuff)? Especially your practicing sessions at times when you were mostly active.
Yeah that's pretty much right. I'll think for a while, especially if I feel like I'm still making progress. At some point, if I'm stuck or I no longer want to work on the problem (or at the end of the contest), I'll read the editorial or discuss the problem. I think it's important to go back and make sure you actually understand the structures of the solution and how they do and don't generalize. (How things don't generalize is a great way to understand what underlying structure is being relied upon.)
Then I usually try to implement it unless it's particularly uninteresting and annoying.
Which things you like and dislike most in your professional life?
I really like being able to learn things from coworkers with experience in different areas than me. One thing that's a lot harder than competitive programming is that the codebases are larger and have to support a lot more collaboration, via things like good design patterns and good testing.
Oh Nice! Thanks for response
huge number of easy questions or few number of hard questions? Which is better for practice? And do you think solving math problems and normal puzzles help in any way?
Probably a mix of many medium questions and some hard questions. I started off doing math olympiads, and I think they helped both understanding concepts and improving problem solving.
how old are you, from when you started coding?
I'm 22, I started programming around age 14.
Do you eat pineapple on pizza?
It's not my favorite topping or anything, but it's tasty, sure.
Can we trust someone who likes pineapple on pizza?
Yes!
Where did the "taboo" of pineapple on pizza come from?
How to be a legend like you?
Some mix of practice and talent.
Speaking of talent, I know IQ isn't a very reliable measure. But still, do you know what your IQ is?
Probably > 10 and < 1000
Bold statement
I love you....Do you love me?
This is Codeforces, not tinder!
You meant grindr, right?
Favorite moment in a programming contest?
My favorite moment was probably solving towns at IOI 2015 in the last 15 minutes of the contest. That problem is so nice, and clutching it out felt so great.
What is your favorite programming competition?
I've started to really enjoy team-based ICPC rounds, it's great to be carried by teammates, and I have some fun implementing some of the more technical problems. It's always great to travel to onsite competitions and meet other contestants. IOI and CodeJam tend to have some very interesting math-y problems. One of those is probably my favorite.
Please Aaron, upload graph theory videos on your Youtube channel.
what is his youtube channel could you please put the link
Aaron he's Youtube channel:https://www.youtube.com/channel/UCpLNLIJ66Lqjwm-E69qbW8w ecnerwala's Youtube channel: https://www.youtube.com/channel/UCn9ng6ZUnh5weU1BsIQoZ5w
Apart from Competitive Programming , what are your areas of interest(hobbies)?
Recently, I've just been playing some video games like Celeste and doing some puzzle hunts.
Celeste is awesome!
are you getting the golden berry of farewell?
Likelihood of me featuring in a Lockout dual vs tourist?
Ask him and find out!
Do you have girlfriend if not any ex ?
And whats your age btw ?
I don't have an SO right now.
I'm 22.
Do you find software engineering to be interesting in general? Asking because the thinking involved is very different from algorithmic thinking.
For sure. I actually really like the parts of competitive programming that are more like software engineering, like designing good interfaces and abstractions. I think that's one of the things that makes me pretty good at technical problems.
hi
How do you prepare your team for ACM ICPC?
For ICPC 2019, we did several contest each week and spent a good amoout of our own time upsolving problems too.
According to you what is your biggest achievement so far?
It's probably winning Distributed Codejam, or 2nd place at ICPC.
Any lockout planned for the near future? Have you watched Errichto's recent lockout? If you hold a lockout in the near future could you incorprate the problem explaining like Errichto did in his lockout?
I'll probably try to do some lockout soon, but no guarantees for now. I haven't actually watched Errichto's stream, but that does sound like a good idea; I'll check it out when I get some free time.
You seem to be extremely proficient in C++. How long have you been using C++ and what are you favorite programming languages ?
I've been using C++ since 2013. My favorite programming languages are probably C/C++, Go, Python, and maybe Rust (I haven't actually used Rust much though). I think Typescript is pretty cool, but I haven't used it much (also npm scares me).
Do u have girlfriend?
Nope
Can anyone become an LGM?
This is a very good question... Why are there so many down votes?
There are 30 slots, and 30000 ppl trying. I think most ppl know the answer.
I think ratatouille said it best: "Not everyone can become a great artist... but a great artist can come from anywhere." -Anton Ego
Not everyone can become a great artist...
Doesn't that quote prove my point? The second part is true but doesn't detract from the first statement.
Ya, I was agreeing with you.
Q1. What is your thought process when you are not able to do good in contest?
Q2. What is the best way to learn new topic and practice and from where?
I think you just have to keep pushing to do better; it's good to reflect a little on what changes you could make to do better in the future and then just move on to the next contest.
Depends on the topic, probably just read about it and make sure to practice on problems.
Do you like monkeys?
i like you.
6/10
Did you practice on some other site before starting off with codeforces? Also if you don't know a particular concept where do you read stuff about it ?
I started off mostly with Codeforces and USACO training (both the training pages and past USACO problems).
To read about concepts, it depends on the concept; sometimes there are good resources on blogs like CF, other times you just have to read papers (which sucks). Asking peers for help is also good.
How to I tackle the frustration in competitive programming .Thanks in advance.
milk first or cereal first?
wtf cereal first for sure
cereal bowl first
which university in {USA / California} is best for {computer science/computer engineering} ?
Google is your friend.
i googled it before but i want to know his opinion. if you want to reply, reply with your main account and dont spam cf.
https://www.usnews.com/best-graduate-schools/top-science-schools/computer-science-rankings
But seriously, all the top schools are good enough that you'll find good experience/opportunities at any of them, so don't take the rankings too seriously. You should probably care more about culture/your peers at those schools.
Did you have the opportunity to stay in academia, and if so what made you want to go into industry?
I really like building things, and there's a lot more opportunity to do that in industry.
How soon after reading the problem would you recommend seeing the editorial ?
Probably after you've stopped making progress, and at least 10-20 mins.
It was at this moment he knew, HE FUCKED UP!
What did you study in Uni? Did you do any research?
I studied CS at MIT, I did a little research but not much.
have you ever thought of giving up cp or took a long break?out of frustration or maybe your contest performance was disappointing to you at some point or for any other reason.
I've taken a couple breaks (see ~2017), mostly because I lost interest or had other things to do.
Who killed Kennedy?
A mystery for more than 50 years...
Few of my questions:
Would you tell us your programming experience from beginner to advanced and how to improve ourself
What one thing you would like to achieve regarding competitive programming?
I want to win an onsite round.
How do you manage time for both job and CP?
I have enough time for both; I don't spend all that much time on CP.
What is your industrial skill . I mean , what you are, a Teacher ,a webdev ,software engineer, ML/AI engineer, etc. ??
I'm a backend engineer.
Do you like and use machine learning in your work?
Where you see yourself after 5 years from now ?
What are you doing for entertainment (without coding ) like tv/movie/song ??
I've started watching some more TV, mostly police procedurals like Person of Interest, White Collar, etc.
Why should we hire you for this job?
Yes
Do u love pizza??
Do u also struggled initially to solve Div2d,div2E??
LGMs dont struggle with div2 Ds
read my question carefully,i have written "initially".
They dont struggle (ever).Its trivial for them from the beginning
Yeah for sure, I mean there was a time when I didn't know BFS.
Do you play any video games?
Some, I've been playing Celeste, some Super Smash Bros. Melee, and I've recently tried playing Dead Cells.
How to Solve This https://cses.fi/problemset/task/1729
Let's Say we currently have $$$i$$$ stones, then $$$\forall\; p_k \in P$$$, if $$$i-p$$$ was a losing state, then $$$i$$$ is a winning state.
For Example if $$$i = 0$$$ then, $$$p$$$ is a winning state since $$$0$$$ is a losing state. Hence the following recurrence holds,
What competitive programming site do you love the most? Is it codeforces or something else?
Probably CF or AtCoder.
With whom do you enjoy solving in a team more scott_wu or ksun48 if you were to choose only one ?
I like all my teammates equally.
What does it take to get 5.0 GPA in BS Math and computer science at MIT ( because you scored 5.0 )
I feel like, I'm stuck in cp in one point, can you suggest me, how can i reach cf 1900+? or what should i follow?
ecnerwala i used to use vectors but because of some serious tle problems i stopped. And it’s really hard to use arrays instead of them. How do you use vectors and handle tle cases?
It happens rarely that you go into TLE issues with vector. Maybe you don't know how to use them properly.
Actually it was rarely but in really serious cases. Once in code jam problem and once in a usaco problem. I was afraid of it happening in the contests so I stopped it. Also It has happened in one of tourist streams which made him the runner up instead of the winner...
Don't use
.push_back()
if you know the size of the array or at least.reserve()
some memory at first. Other differences are minor.Yeah, vectors shouldn't have much problems unless you allocate/deallocate them frequently. I try to always
reserve(sz)
to avoid log(n) resizes, and also try to preallocate large vectors outside loops.My girlfriend left me. I called her. After an hour of argument, she agreed to come back only if I become an expert in a month. I am confused and sad. Bitch took my earphones too.
Can you please share her details in dm if she doesnt mind? I know someone who can become expert in a month if mike increases frequency of div1s.
Don't forget to take person's explicit consent before sharing his/her details.
Do you mean fall to expert from purple+?
Hum Indians jitna bhi tarraki karle, dil se hamesha harami rahenge XD
Why is ecnerwala?
what the hell?
Is coronavirus a hoax made up by flat earthers?
No. Stay safe and healthy!
What are frogs?
How hard did you work to maintain your perfect 5.0 GPA? Also, considering you didn't pursue academia, why did you go through so much effort to maintain a perfect GPA?
I didn't maintain a perfect GPA. I did well in classes because I chose classes that were interesting and I wanted to learn from.
Wow, amazing! I envy such passion!
I can't help but think of classes as a chore :(
What brought CP to you?
I got into it because there was a lot of overlap with the math olympiad community (looking at you guys scott_wu and stevenkplus).
How transferrable is CP to real programming? Do you use a lot of skills that you learned in CP during work?
Yeah I think there's a decent amount transferred, particularly about writing clean/testable/bugfree code.
When you were at the beginning stage of learning CP, how did you spend time for different topics (DP, graph, math...) and what were your ways to maximize the productivity in the decided time spent?
I didn't really split my time by topic too much after learning the basics in each.
What happened between 2016 and 2018?
Life
2017, duh
Yeah, I took a bit of a hiatus to do other things; CF rounds conflicted with classes, and there were other things I wanted to do.
your favourite sport other than competitive programming
I played a bit of Ultimate in college. I don't watch sports much, but if I had to choose, it would be basketball or hockey.
Your are a legendary grand-master. You spent a lot of time in cp. Do you think that you sould have been spent slightly less time in cp and do "something else" ? If so what is that "something else"?
I do CP mostly as a hobby now, so I don't really regret spending too much time on it. If there are other things I want to do, I do those other things as well.
are you a coffee person? or tea?
Did you/do you do competitive math too? I vaguely recall seeing you in some of Evan Chen's streams.
https://codeforces.net/blog/entry/81358?#comment-678652
Yeah, I started off doing math competitions, and I first met a lot of OI people through math competitions. I've definitely been in a few of Evan Chen's streams, you should check him out if you like math olympiads; he's a god.
do you have an Android or IOS smartphone ? which OS do you have in your computer ?
I have an Android phone (LG G7) and I run linux.
What do you do when you get bore with problem-solving? How do you refresh your mind!
What was your usual routine at MIT?
How did you manage your time between competitive programming and college work?
My usual routine at MIT was pretty standard; go to classes, do homework, socialize, etc.
I didn't really split my time between cp and college; see the break I took in 2017.
What is the point of doing cp professionally?
I don't do it professionally, it's mostly a hobby for me.
I think if people do go pro, it would mostly just like any other esport.
Wish me good luck for my first appearance of Div 1 contest.
How did you start competitive programming? Do you have any tips for beginners?
You're just 22. Are you the youngest Legendary Grandmaster?
Benq is
As far as i can remember it is djq_cpp ,he is less than 15
But he asked Legendary
His maximum is Legendary
but not now.
omg! how old was he when he started competitive programming ?
Definitely not; I'm pretty sure there are/were LGM's in high school.
how did you think of the idea of putting your name in reverse? it looks so cool!
What is your favorite show?
I really like the first few seasons of White Collar.
It seems like you really love lambda expressions, any particular reason why?
I just hate globals. Also, you can define lambdas near where you use them so that the control flow is still obvious.
Is the Y combinator+lambda as efficient as an explicit recursive function?
I think it's essentially just as good, though I haven't done any benchmarking. The assembly does get inlined the way you want.
From Where do you learn new algorithms?
Other people mostly, sometimes papers or blog posts.
What do you usually do when you are free ? Or you are always busy ? :D
Challenge: Solve your next contest problems in python only
Naw, I don't want to deal with fast-Python-io and stuff.
Why you don't have an avatar on Codeforces?
Also: if you could only solve problems from one of these platforms: Codeforces, Atcoder, or Topcoder, then which one would you choose and why?
Too lazy to set one, I guess I'm not photogenic enough.
I'd probably choose CF, mostly for volume.
Do you have a mirror then?
ecnerwala proceeding to set a mirror as his avatar
Are you ecnerwala?
...it's ask me anything after all.
You can ask, but I don't have to answer.
Is ecnerwala interested in starting a startup?
Potentially in the future!
Are birds real?
How can birds be real if eyes aren't real?
I think people didn't get this one.
Can you be my mentor for competitive programming?
How to be able to think CP questions in free time(like pooping or bathing). I don't have enough time for practicing. This semester's like hell. Not even a single hour to study. Sme tips on how to manage time for CP?
It definitely sucks to be super busy, there's not really any CP-specific time-management tricks I have. You just have to prioritize and make sure you're efficient with your time.
How do you feel having to get up in the morning at 730 and giving a contest? Does it get you all set for the day?
7:30 is pretty early, so it kinda sucks (could be worse though: AtCoder is at 5am). I don't know if it really sets me up for the rest of the day; it's a lot of mental energy to compete.
Have you thought of becoming one of the best when you were just starting?
Do you think knowing algorithmic theory is important for CP, i.e proof of correctness of some of the famous algorithms...etc. Also, where did you learn C++, you look really skilled with the language.
Do you have any advice on getting good at competitive programming quickly?
Also do you have any advice on what I should if I cannot solve a problem other than reading the editorial? (because just reading the solution feels kind of useless ad you don't really seem to be learning anything that you can apply on other problems)
How 2 nutella?
What problem paradigm (e.g. graph, dp) are you strongest/weakest in?
I'm pretty strong in some mathier areas like counting or NT, as well as generally pretty good at implementation. I think I'm weakest at heuristics/constructions.
As a Californian, is there any particular reason that you chose MIT over Stanford?
In general, I think it's good to go somewhere further away for college, otherwise you're really always in the same little bubble. I like the culture at MIT a lot.
ecnerwala have you ever participated in IMO?
No, I came close though.
Are we in a simulation?
Probably not.
How did you choose to study CS at uni? Did you have any other interests in other subjects? If so, what made you choose CS?
I had already done a lot of CS in high school, so I knew I was interested for sure. I also was interested in math or physics, but ultimately I liked CS too much.
I was stuck in Round 664 Div2-C for more than half an hour. People say if you are stuck for more than half an hour, you shouldn't try more and just wait for the editorial. So, I gave up. Later when only 15 mins were left, the idea struck my mind. And I couldn't implement within those 15 mins. But after the contest, I submitted and it was correct. So, how should I decide whether I should give up or not?
You should never give up on a problem during a contest; that advice is for upsolving/practice, where you could potentially keep working indefinitely if you so chose.
On the other hand, it can be good in contest to take a break or think about a different problem, so you can come back with a different mindset/different ideas.
It's perfectly fine to switch to the next problem (even without the intention to getting back to the previous one during a contest).
Did you solve problems from UVa online judge?
There are very good problems and a vast number of hard problems but the problem is there are no editorials(idea, proof, etc.) for the problems. Codes of other participants don't help to properly understand most of the time.
Definitely it's true that many people somehow solved many problems from UVa in spite of this difficulty, I don't know how they did it. If anyone knows how they did it then reply, please.
What do you think ecnerwala, what should we do when we stuck for some problems in UVa?
No, I've never solved on UVa.
Solving problems without editorials is definitely a tricky thing to do. I would recommend talking to peers about the problem, and if you still can't find a solution, it probably is actually slightly too hard for now; just set it aside and come back in a few months/years when you know more and then take another stab at it. Having problems open in the back of your mind could lead to you discovering something!
Trump or Biden?
Kanye West
Your favorite video game?
Maybe Bastion, Exapunks, or The Binding of Isaac.
Hi, Do you believe in God?
Hey have you ever got mentally exhausted with a problem in a contest? like "I don't want to think anymore" kinda stuff
Yeah, but in contest, you usually just have to push through.
How much do you bench?
Embarassingly little.
I have knowledge on DS, algos but have very less experience in c++ or any other language coding.
I find codeforces problem tough even after seeing codeforce solutions for each contest. what should i do? ecnerwala?
Code a lot of problems! See my advice on difficulty above.
Do you like Timus OJ? Are there any particular sites (apart from the discussions, which are often unreliable) where one can get editorials/solutions for Timus problems?
I've never used Timus, sorry.
What is the cp achievement you are most proud of?
when you do competitive programming as a by product do you fall in the eyes of big companies and if yes how do they attempt to approach you ? Do you just have to top the coding competitions or doing fairly good is enough ? ?
I don't think I've received too much attention from just coding competitions; it's usually been just CodeJam/HackerCup finals and other big onsites. On the other hand, I'm in a pretty privileged position to be able to reach out more directly to a lot of companies via MIT/SFBA, so coding competitions could potentially be helpful.
On a scale of 1-10 how much would you rate your understanding of C++ as a language?
7 or 8; I know a lot, but C++ is a crazy language with super crazy rules.
Чей крым?
Any ideas on whom I’d need to talk to about commentating for NAC next year? Or is the best way to get invited to that just being really really good?
Also, do you have any plans on live-VPing 2020 ICPC WF (with some of the LGM/IGM friends if they are interested) similarly to what tourist/Petr/endagorian usually do?
People got invited mostly just from word of mouth. If you or anyone else from NA is interested, lmk.
We'll have to see about WF, I'd be down, but I haven't talked to any organizers yet.
Nili's Apartment Cup?
It’s “NAC Acronym Challenge” actually.
Is Machine Learning overhyped?
It depends; some people overhype it, but it actually can do some amazing things. We'll just have to see where it goes.
Have you ever thought as a beginner that one day your cp journey will inspire thousands and will make you this much popular?
When you're stuck / discouraged: what fuels you to keep pushing yourself?
It's mostly just finding problems I'm interested in, and learning new things is pretty cool.
Why don't you have updated your profile picture?
Do you have any plans for your Youtube channel, like uploading screencasts and stuff? Would love to see that.
What's your opinion of the finance / fintech industry? Why did you decide on pure software instead of some type of mixture?
I think there are some challenging problems in that industry, but I like software engineering more.
1.Do all computer science students in MIT do competitive programming?? having said that , are all good at it or you remember any of your friends struggling with it?
2.Do you have any plans of coming to India for a tour ? If yes, do ping me once, it will be an honor to do your hospitality!!
No, almost no one at MIT does competitive programming, it's a very small minority. Most people probably would not do that well because they haven't ever practiced for it.
Maybe someday!
Hi How do you manage time between CP and Work? I assume you have min 8 hours of work. Do you give time to improve yourself in writing good quality of code maybe by reading some books? Like some people with java background read effective java etc.
I don't read too many programming books, but I do think that improving code quality is a good thing to spend time on.
You have said that you had started CP at the age of 14. You had spent so much time in CP, then how did you manage time for academic study?
In universities, we spend a lot of time to do classes and when some exam comes up, we have to study for a long time to do better. For this difficulty, I can't spend so much time on CP. But I know some of the Competetive Programmers who are ACM ICPC world finalists and at the same time, they have very good results in their universities.
What have you done to avoid these difficulties? Advice me that what should I do to manage time?
Do you really have to study so much for university that you can't take out 2 hours per day on average for CP (which is enough IMO), or are you just trying to find excuses for your own laziness and wasting time? I have friends who are really good at CP + CGPA. They don't study too much. They are attentive at classes / labs, finish large lab assignments swiftly (CP skills come handy here), really good at cramming so they just study 1-2 night for each quiz / class test and 1-2 week for each term final exam.
What season do you like most winter or summer?
Don't you think it's selfish and inconsiderate of you to make such request (you didn't offer him anything for taking such a trouble of travelling to another country)? And unfortunately this is not the first time I am seeing such selfish inconsiderate requests from you (here). Please try to be more considerate of others and less selfish in your requests.
Why do most USA IOI team members have a Chinese family name?
Yeah, Asian Americans are definitely overrepresented in the US IMO/IOI teams compared to the population. It's hard to really say why; one hypothesis is that their parents (often highly-educated immigrants) are more likely to care more about education or olympiads, so they end up studying for it more/earlier.
So can you speak Chinese? And at your world final team with ksun48 and XYZ, do you guys use Chinese for discussing?
I can speak Chinese, but it's definitely not good enough to discuss programming. xyz's English is way way better than our Chinese, so we used English for everything.
The `normal' US/Canadian education system is also highly broken, especially when it comes to teaching advanced materials.
I really don't like to associate words like overrepresentation with things like IOI/IMO, hopefully it's one of the last things that remain completely merit-based.
omg richard peng still alive
Many American parents heard that Chinese are the best at OI and they changed the children's surnames to Chinese to try to be like them.
Ksun48 may you explain us the incident how you met ecnerwala, stevenkplus, scott_wu(harvard) in MIT . Share any great time/incident you had with all the three people.
What's the most useless talent you have?
I can kinda recognize some common letters in Morse code.
What if I gave you :
i- 1 million dollars but you'll never get first place in Codejam Finals?
ii- 10 million dollars but you'll never get first place in Codejam Finals?
iii- 100 million dollars but you'll never get first place in Codejam Finals?
iv- whatever amount of money you desire but you'll never get first place in Codejam Finals?
I mean , are you willing to trade that rank for huge money? Tell me honestly please. :)
What if google starts 0 based indexing in the rank list after he gives some share of money to them?
What if 100 million dollars isn't sufficient? You should at least provide one option where he can manually choose the equivalent amount.
Good point. I'll edit the comment now. XD
The question should be: what's the smallest X such that you prefer getting X dollars over winning GCJ.
I guess now I have lost my right to complain "the problem statements were lengthy". XD
I think that is a different question. In the original, you get the money even if you would never actually win the Code Jam finals.
I would take 1 dollar to never be able to win Code Jam, because there is pretty much no way I could ever win it, but I sure would not resign a first place Code Jam finish for a dollar.
I wish tourist reads your comment
I think it's probably > 10 million, and < 1 billion.
(This kind of question is hard to phrase: I would obviously never pay to win a contest, so I think phrasing it as you either get money or are allowed to win is the right thing.)
Yeah. I wasn't talking about pay to win.
Hey encerwala! If you got a chance to go in past by time travel, what will you do first?
Hm, I'm not sure. The present is pretty damn cool.
When did you actually started competitive programming (like, in middle school or something)?
I started in high school.
How the hell can you code like this: https://codeforces.net/contest/1395/submission/89753399
Very interesting :D
Wait, you thought that he normally types like this?
No, but I don't think that anyone can CODE like that, ever.
Then why you asked? It's obvious that he first codes normally and then formats like that.
the enter key was broken
What to do if one feels like he is not improving in spite of practicing regularly?
Maybe try focussing on a different area of practice; try to identify some more specific area to practice.
what is the silliest mistake that you have done?
The first time I attended the USACO training camp, there was a problem with a pretty simple greedy solution. I implemented the solution without proof, but I failed because of integer overflow. I didn't realize, so I spent a ton of time trying to optimize a brute force instead :(
What kind of music do you listen to?
How do you pronounce ecnerwala?
https://codeforces.net/blog/entry/81358?#comment-678620
ask me anything
Which one had come first in the world: hen or egg?
Egg. Even dinosaurs had eggs.
1) How many hours a day do you usually practice? 2) Did you do math competitions in ms/hs? 3) What's your favorite area of CP?
Why did i get a wrong-ans submission? Need help!
My submission: https://codeforces.net/contest/946/submission/89803821
Problem: https://codeforces.net/contest/946/problem/D
Your favorite color?
I like a deep maroon or navy blue.
I bet you can have that on codeforces if you are heavily drunk while doing a contest.
ecnerwala
How?
HTML
Thanks for doing AMA! More people could take it as inspiration.
Questions: 1. What are the most interesting problems that you have encountered? 2. Why did you decide against doing a Ph.D.?
Does having a great rank helps in making international friends for life and will you be my friend on facebook?
I've definitely met a lot of friends from attending international competitions. Sorry, though, I don't really friend people I haven't met IRL.
Where do you see yourself in 5 years both professionally and personally ?
I'm not sure, but I hope CP is a lot bigger!
Do you have any advice regarding staying productive and not getting distracted?
You can try things like Pomodoro to stay focussed for a while and then take a short break.
Thanks!
Thanx for having this session.
My real name is Andrew He (you can find that in my profile). I don't have a twitter.
How many comments did you reply to?
How to become red on CF??
What differentiates LGMs from reds ?
3000
Who do you think will win in Um_nik vs Thousand Cyans Contest ?
10^18 newbies
What's your favorite book?
can u please answer this? https://codeforces.net/blog/entry/81432
I love cows
do you?
You seem to write code which is more similar to how people code in the industry\readable oriented, than in CP imo. (lack of defines, no arrays outside in outer scope, reserve optimizations, using std::array instead of pair<int,int>, etc.)
So I went over your code for few answer in the last round, and I was wondering:
Why do you cast size_t everywhere? i.e (for (int i = 0; i < int(vec.size()); i++))
Do you use macros for int64_t \ for(auto& a: arr) \ vector<vector>, push_back, or do you type it down each time?
Do you feel like emphasizing clean code and usage of stl functions, help you CP better?
What does y_combinator means? I'm guessing it doesn't have anything to do with the y_combinator start-up hub.
For the 4th point, you can refer https://usaco-guide.vercel.app/general/cpp-tips#recursive-lambdas. It's basically a way to write recursive lambdas without resorting to workarounds like
std::function
I tihnk this is one of the big things that makes me good at implementation. I think it's funny how you called it "readability-oriented", because I think being able to read your code pretty essential; how the hell can you debug if you can't follow your own code? To implement any longer, more technical problem, your can only keep a little bit of the code in your head at a time, so the rest of it must be clean/readable enough to go back to it.
That said, some of the things I do are just because I'm a perfectionist and want to use "correct, modern C++", rather than have things like global arrays and stuff.
(One particular point: I try to use std::array instead of std::pair<int, int> when the two elements are "symmetric" because it's easier to see/use the symmetry with array syntax than with first/second.)
-1 < size_t(0)
actually returns false. I've pretty much built the habit to always cast to int to avoid this. Also, there are compiler warnings to check this (-Wsigned-compare) which I use, and I want to silence them.oh, now I get it why when I was trying to make a recursive call using lambda it gave an error.
Its easier to get a Girlfriend being LGM?
what came first? The chicken or the Egg?
What are your SAT scores?
Hi ecnerwala!
If you had to take an educated guess, what range do you think USACO (bronze,silver,gold,platinum) problems fall in terms of Codeforces problem rating?
And do you think doing Codeforces will make you better at USACO?
What do you listen to when you do a contest or practicing in general?
Yeah nice how to solve this question : https://atcoder.jp/contests/abc175/tasks/abc175_f[AtcoderF](https://atcoder.jp/contests/abc175/tasks/abc175_f)
By the way do you think that machine learning or the new techs of deep learning will swipe away competitive coding ?
Do u prove every answer mathematically??Like i want to ask most of problems u solve are by intution or by rigrous mathematical proofs.
I want to do better than you ecnerwala!!! what i should do for this??
.
If that was sarcastic, then it's really funny. Otherwise... Oh boy.
Do you agree that icpc requires a wider knowledge of algorithms/data structure? If so, how much wider and could you give a few examples?
For sure, ICPC-style contests (especially OpenCup) much more frequently requires some pretty advanced stuff like BBST, FFT, general graph matching, or generating function tricks. I think a lot of this is because ICPC is longer (15 man-hours per team of thinking time, 5 man-hours of keyboard time) and intended for an older audience (college, not high school), so people are more comfortable putting harder topics on it. I think OpenCup's place as a contest to explore more advanced topics is a very good thing to have.
Thanks a lot for the answer!
Not really a question, but congratulations for being the first one to solve the whole problem set of FHC Round One.
;0
I enjoy coding in codeforces and wanna become programmist one day. Do you think it will help me achieve this?
How much time do you spend to keep a LGM-level performance?
How much time is needed (for you) to be an LGM(from a newbie)?
Do you play CTFs?
Sometimes, but I'm not that good. I can do some easy rev and even easier pwn, and I know a little crypto because of my math background.
What computer do you use for programming and which operating system?
I use a ThinkPad X1 Carbon (6th gen) running Linux with i3 window manager.
Auto comment: topic has been updated by ecnerwala (previous revision, new revision, compare).
Is ecnerwala Early bird or night owl ?
Ever happened that you stuck in A or B in Div2 after being red???
which Operating System do you use
Do transformers have health insurance or car insurance?
They have Plot Armour so they don't need insurance.
How to become as good as you.
Which Editor do you use to write your code?
Sir what is your age??
If you were to just read some of the other answers, you'll find out.
22
Are there any algorithms or data structures that you know about them, but can't implement without searching more information? I mean algorithms that can be used in competitive programming.
ecnerwala, what is lenght of your dick in millimeters? Ignore this comment if its less than 50 milimeters.
Go ask ur mom.
What you think about it??
Sexism in Google Hiring
Have you ever faced anything like that??
Can you please make a video on how to get an NVIM setup similar to you , in your youtube channel?
I probably won't make a video, because there's not much to explain. My vimrc is at https://github.com/ecnerwala/dotfiles/blob/master/vim/.config/nvim/init.vim
I think you'll soon be the next world champion as far as programming is concerned. Right now you're 2nd. I have a lot of expectations from you. All the best.
Hi i'm wondering how you choose proper CP problems for practice? I often find the problems I am doing either too hard or too simple and spend too much time struggling with thinking solutions and understanding editorials. I feel that my training is quite inefficient. Do you have any suggestion? :D
How is your family?
Is math invented or discovered?
yes
I agree, but how?
we invent a system of axioms, and then discover things about that system
I was thinking about whether the axioms themselves are somehow fundamental in nature. For example: Are the natural numbers (which are based on The Peano axiom) just an invention of humans.
First of all I think that "invent" and "discover" are human terms that don't have an exact meaning: the definition of these words is approximate and unclear. Like most words, their meaning is generally agreed upon when we talk about typical usages (elecricity was discovered, lightbulb was invented) but the words themselves don't have a well-defined meaning when we get to edge cases (math). So in some sense, the question is meaningless.
Some other philosophy: I would be careful when saying things like "we invent a system of axioms" (at least, for some definitions of "invent"). The axioms may be "invented", but the reasons why axioms are chosen are "discovered". Because axioms aren't constructed randomly. The ideas of groups, rings etc. precede the axiomatic systems that we are now used to. The terms used to refer to more specific terms until someone noticed a more general pattern and introduced the axioms to talk about that pattern. Using "invent" and "discover" according to my intuitive interpretation here: the more general patterns were discovered, and the axiom systems introduced to talk about those things. The concept of groups was there before the axiomatization, it might make sense to claim the axioms were invented but groups themselves were discovered.
Probability / 50% confidence time interval til we get Dr. ecnerwala / Prof. ecnerwala? (does one capitalize handles?)
ecnerwala did you always initially believe in yourself? Have there been times when you completely hated competitive programming and then back you want to solve many, many problems? or this only happens to me?
Very off-topic, but hey, your submissions look very suspicious https://codeforces.net/contest/1499/submission/110342955 https://codeforces.net/contest/1499/submission/110361700 https://codeforces.net/contest/1499/submission/110366572
Similarly, the submissions for the recent round also have code obfuscation. On top of that, your submission times are also a bit suspicious for a candidate master, given that you got A, B, and C under 22 mins, and then resubmitted B later with more obfuscation.
Can you tell me how to improve coding skills ? Can you give me advices ? (Links, problems, videos) ?
IN my eyes your my G.O.A.T
I don't think anyone has asked this yet, but will you be posting more screencasts in the future on YouTube? I enjoy watching them.
why is your username ecnerwala?
Are you still there to answer anything?
What's the secret of your transition from Pupil to GM I just 16 contests?
Hi! I have a question for you: Have you ever cheated on your way to learning CP?