October 11, 2018 A Problem Writing Journey

I started problem writing in the summer of 2014. It was the summer before my senior year at university, and I had an internship in Palo Alto. I had trouble adjusting to work since it was my first experience in industry. The work lacked many interesting algorithmic problems and it was hard for me at the time to appreciate other non-technical challenges. Programming contests were something comfortable I fell back on.
Earlier that year, Topcoder had been pushing for new problem writers. They were offering increased problem writing payments and trips to TCO for writers. At the time, I felt I wasn’t successful as a competitor and struggled to get to red on Codeforces and Topcoder. I didn’t know if my problems would be that interesting for top rated competitors. Despite that, the rewards were enticing, and I felt encouraged to try it out anyways. Becoming a writer also offered a fresh opportunity for me to stand out in the programming contest community. I felt hopeful for the chance. I sent an application early that summer to see if I could get any of my problems accepted.
One thing I also looked forward to that summer was the ACM ICPC world finals. I finally qualified for the first time, and I was excited to take a week off work and get back to the familiar world of competitions. The experience at world finals, however, was disappointing. The problems were interesting, but our team couldn’t execute on solving problems. We only solved one problem at the end of the five hours. The trip dealt a huge blow to my confidence, and I came away feeling extremely inadequate. It felt even worse when I got back to work, having nothing to be proud of after taking a week off.
If there was ever a point where it made the most sense for me to retire from competitive programming, this was probably it. I wasn’t satisfied with my performances so far, and I wasn’t sure why I still competed when it was making me unhappy. However, before world finals, I had already submitted a problem writing application and was in the queue of upcoming SRMs. I couldn’t give up at this point. My first round was about a week after world finals, and the preparation for the round distracted me from dwelling on my team’s dismal performance.
One of the first problems I remember creating was while I was stuck on a long car ride home. The idea was inspired from an old USACO training problem. In that problem, we are given a weighted graph, and we want to find the weight of the shortest path between two vertices with exactly K edges. The number of vertices is at most 50 and K is at most 10^9. Unfortunately, I don’t remember the link to this problem. The solution is a combination between floyd warshall and matrix exponentiation. I thought the solution idea was interesting, and wanted to show another application of the idea by making the original problem a little harder.
The extension I came up with is the medium in the first SRM (626) I authored: https://www.topcoder.com/stat?c=problem_statement&pm=13218. This isn’t too far from the original problem, and the intended solution is similar. Before the round, I worried that the problem was too standard and people would solve it extremely fast. I worried that top competitors wouldn’t like the problem and would complain about the problem being too standard. During the round, one of my fears were confirmed, and tourist solved the problem in less than 8 minutes. Despite that, nobody complained too much. I received positive feedback after the round, and the problem even got mentioned in Petr’s blog later that week. That made me want to continue.
In my last year at college, I spent more time writing problems for Topcoder. I didn’t have much else to do. I struggled to decide what I wanted to do for my future. My summer internship didn’t leave me with a good taste of industry. The pace of research in grad school felt too slow for me. My school lacked a strong competitive programming community. I felt stuck and aimless. It was easy for me to spend a lot of time writing problems. Around this time, I also branched out to other online judges and local contests. I wrote my first codeforces round and got involved in writing for NAIPC. All this distracted me from figuring out what I should do after graduating and connected me with others interested in competitive programming.
After graduating, I decided to give industry another try. I still had doubts at the time on whether this was the right choice. Luckily, after starting work, I found other people interested in competitive programming, and it felt great having an easy way to connect. I wanted to continue writing problems and staying active in competitive programming. I still struggled initially to adjust to work life, but I couldn’t have made it through without having the support I found from others. One thing I wish for is a stronger competitive programming network in industry. I have seen first hand again and again that competitive programming can be a strong basis for creating professional connections. This is all through ad hoc connections and it feels like it could be much stronger if there was a more formal framework.
I’m also thankful for all the support and help the admins at Topcoder gave me with developing my problem writing skills. The first admin I interacted with was rng_58, and he had a very high bar for quality. He helped a lot in improving my initial problem writing skills and would give me direct feedback on which problems were too straightforward and which problems were appropriate to use. Later admins like cgy4ever, and now misof, also have helped me tremendously to further develop my problem writing. Of course, there are countless other people who have tested my rounds on Topcoder and other platforms that have been a huge help.
Problem writing has also greatly improved my problem solving abilities. One common skill they have is exploring several different solutions to find one that works. The main difference is that there isn’t as clear of a goal in problem writing, and all those different solutions can lead to different problems. My rating has improved a ton since I’ve started writing problems, and I’ve recently been able to qualify for various different onsite events as a competitor. I also won a free trip to TCO this year as a problem writer, which is one of the incentives that got me into problem writing in the first place. This was a dream I would never have imagined I could accomplish back in 2014.
I started competitive programming almost 8 years ago, and I have been writing problems for 4 of those years. Over the past 4 years, I’ve written over 200 problems (over half of which are for Topcoder) for ~10 different online judges / contests. I started it back then, unconfident, and unsure of what I wanted to do. I still do it today since I think it’s a great way to give back to the community and for me to stay connected with others. Topcoder has been huge factor in launching my problem writing career, and I hope it’ll continue being a great place for me and others to grow.

Harshit Mehta

Sr. Community Evangelist

categories & Tags


Sign up for the Topcoder Monthly Customer Newsletter

Thank you

Your information has been successfully received

You will be redirected in 10 seconds