How USACO Camper, Grace Cai, went from USACO Bronze to USACO Camp to MIT

Here is the full Q&A, where I talk with Grace about her journey through competitive programming: How USACO Camper, Grace Cai, went from USACO Bronze to USACO Camp to MIT

Hello, everyone! I'm Riya, and today we have the pleasure of hosting a remarkable guest, Grace Cai. Grace, a former USACO camper, will be sharing her inspiring journey from USACO Bronze to USACO Camp to MIT. We'll delve into her experiences and strategies, and hopefully provide some invaluable insights for aspiring programmers.

Early Challenges and the Path to Silver: 

Grace's journey into the world of competitive programming began in ninth grade when she attended a STEM-focused high school, Montgomery Blair High School in Maryland. Introduced to USACO through her school's computer club, she was immediately intrigued by the world of algorithms and logical problem-solving.

In her initial encounters with USACO, Grace admits to facing challenges, particularly as she was coding in Python. Although she swiftly progressed from Bronze to Silver, the transition was not without its struggles. Concepts like BFS and DFS remained elusive, and she realized she needed a more structured approach.

Serious Learning and Algorithm Mastery: 

It was at the end of her ninth-grade year that Grace embarked on a serious journey into algorithms. She attended a specialized camp designed to prepare students for USACO, dedicating two weeks to intensive algorithmic coding. Here, she honed her skills in areas like shortest path algorithms and MST (Minimum Spanning Tree), laying the foundation for her future success.

As she delved deeper into algorithms, Grace began exploring USACO Platinum topics. Networking with her peers, who were already in the Platinum division, proved instrumental in her learning process. She also scoured the USACO website and utilized Codeforces, specifically the Division 2D and 2E problems in the problem set, to enhance her problem-solving abilities.

Furthermore, Grace highly recommends participating in Codeforces contests. The platform's categorization of problems by tags and its emphasis on logic and solid coding skills made it a valuable resource. Codeforces contests also provide the unique challenge of not displaying individual test cases, requiring participants to ensure the robustness of their solutions.

Problem-solving Approach: 

Grace's approach to competitive programming stands out for its meticulous and analytical strategy. Her methodical approach revolves around maintaining a problem log, where she records her solutions, improvements, and personal reflections for every problem she attempts. This practice has proven invaluable in her journey, offering several key advantages:

  • Identifying Areas for Growth: By documenting her solutions and reflecting on her thought processes, Grace gains a deeper understanding of her strengths and weaknesses. She can pinpoint specific areas where improvement is needed, allowing her to tailor her practice to address these gaps effectively.

  • Tracking Progress: The problem log serves as a progress tracker over time. Grace can revisit her previous attempts, comparing her past and current solutions to gauge her advancement. This historical perspective motivates her to strive for continuous improvement and provides a clear sense of accomplishment as she witnesses her growth.

  • Effective Learning from Mistakes: Grace doesn't shy away from recording mistakes or suboptimal solutions in her log. Instead, she views them as valuable learning opportunities. Analyzing her errors and understanding what went wrong empowers her to avoid making similar mistakes in future challenges.

  • Strategic Topic Selection: Grace's approach to problem selection is equally calculated. She concentrates on recent problems that align with the specific topics she aims to master. Rather than randomly picking problems, she strategically targets those that present new challenges or delve into unfamiliar concepts. This approach ensures her learning remains purposeful and relevant to her competitive programming goals.

In essence, Grace's structured and analytical approach is a blueprint for success in competitive programming, offering a clear path to improvement and excellence.

Optimizing Study Hours: 

Grace's study hours during her intense summer learning varied between 8 to 14 hours per day. She dedicated herself to putting in the long hours every day, as solving more problems and getting in more repetitions can drastically improve problem solving skills.

However, in her tenth-grade year, Grace realized that quality work mattered more than quantity. She emphasized the importance of analyzing her solutions, learning from her mistakes, and pushing herself to tackle difficult problems. This shift in focus significantly contributed to her rapid improvement.

Hard Work Paying off

Grace's determination and meticulous preparation paid off during the December contest of her tenth-grade year. Not only did she manage to get a perfect score on silver, but she also achieved a high score on the Gold division, allowing her to advance directly to Platinum in one contest! This remarkable achievement demonstrated the results of her dedication and analytical approach.

However, her hard work extended past just the confines of Gold. Within her first contest in Platinum, Grace was able to score a 556 after solving one full problem, and achieving partial credit on the others. This was a big achievement for her, as she was already reaching camp level scores despite only being in silver just one year prior. However, this was just the beginning, as she would go on to increase her scores dramatically over the next few contests. 

Practicing for Platinum

Between her first and second contest in Platinum, Grace’s score increased almost 200, which is half of a problem! Between these contests, Grace practiced largely the same kind of problems as before - division 2 Codeforces and Platinum problems- but with one big change: topic lists. 

Grace met many fellow competitors who were also studying for USACO, and received many resources from them, the most effective being a list of topics, along with different problems that one could use to reference and practice those topics. The problems came from various sources, including Codeforces, Peking University Online Judge, ACM, spoj, and of course, USACO. She was able to utilize this resource to learn many new algorithms that she had never heard of before and get lots of practice with the algorithms she was already knowledgeable in. Plus, she made many new friends!

However, Platinum’s curriculum was simply too large to cover; topics that had never shown up before could come up in the next contest. Thus, despite coming across unfamiliar topics in contests, Grace decided to not get hung up on them, and instead prioritize topics that are most likely to show up, and become an expert in those areas. This maximizes the value of her practice, as a topic that may show up once every 3 years is never worth practicing as much as Dynamic Programming. Luckily, the topic lists that Grace received had a priority within them, and Grace was able to focus on more important topics within her practice. 

Qualifying for Camp

Throughout the year of 2017, Grace went on to set more and more impressive scores. In January, Grace achieved a 556, and in the February contest, Grace scored a 744, which was two full problem solves along with partial credit on the last problem. These scores were more than sufficient for camp, and in 2017, Grace was selected as a USACO finalist. 

Motivation

Sitting down and coding for 8-14 hours in one day is understandably a chore to many, and people often get burnt out when practicing this much every day. For Grace however, doing competitive programming is more of a hobby, and she always found her practice sessions exciting and peaceful, as it allowed her to express logic in a nice way. In fact, Grace emphasizes that having a natural interest in programming is incredibly important. Often, people do USACO purely for the sake of college applications, and while this is a valid motivation, if you don’t have the natural interest in it, you won’t be able to put in the long hours when you need to. 

Of course, even with a passion for problem solving, thinking about hard concepts for hours on end is incredibly tiring. Thus, when faced with fatigue, Grace would take a five minute break, and then force herself to come back to it to avoid procrastination and distraction. 

Another technique Grace used to gain motivation was to get herself into a routine. Every day after school, Grace would immediately open up a problem and start thinking about it. Then only at night would Grace do her homework. This made it so that it was as natural as brushing her teeth for Grace to practice every day. In fact, competitive programming worked as more of a de-stressing activity for Grace from things like school and homework. Even if the problem was hard, focusing on one thing without a care for anything else at the moment was really relaxing.  

Debugging

Like many, Grace initially had lots of trouble with debugging. When she was competing in the Facebook Hacker Cup in 9th grade, she started using C++ for the first time, and began learning the standard library. As she was learning how to use C++’s map for the first time, Grace ran into a bug that took her around eight hours to fix! In the end, the reality with programming in general is that you will run into really simple bugs that can take many hours to find, however, there are many ways you can improve at debugging and avoiding bugs in the first place. 

As Grace improved and rose in the divisions, she was able to greatly improve her debugging skills. The first skill Grace emphasizes is knowing where to find the bugs. For example, you are very unlikely to have bugs when reading in input, so you can mostly skip past that when debugging. In general, identifying places where bugs are most likely to reside can drastically decrease your debugging time.  

Another thing Grace emphasizes is readability. Oftentimes, less experienced programmers introduce lots of redundancy and unnecessary complexity into their code, such as unnecessary break statements, or implementations that technically work but are very unconventional. Having a clean implementation that is nicely structured can greatly speed up the debugging process, and also helps avoid bugs. To help improve code cleanliness, Grace suggests thinking about the problem more clearly and planning out implementation before jumping right into the code.  

Many programmers, especially those using C++, will also have a long template, including a list of “#define”s. While these are not inherently bad and can definitely speed up implementation if one is really familiar with them, they can clutter your code up, and make it harder to understand the code when reviewing it during debugging. Grace initially had a long list of macros, but eventually got rid of all of them except for a few that were most commonly used, such as “f0r” to represent a for loop starting at 0. However, macros that are useful for debugging are those that can help with printing. For example, a macro that can print out everything in a list in one statement can speed up debugging, as you are able to print your data and reevaluate more quickly.  

Grace’s Advice and Journey’s end

Grace emphasizes the importance of enjoying yourself when doing USACO. If you don’t enjoy problem solving, then the long journey to achieving milestones in USACO will be painful, especially the grind to Camp. Furthermore, high school is the best time to do competitive programming, since it builds a strong problem-solving and programming foundation, and when you’re in college, there are many other opportunities within computer science to explore. 

After becoming a finalist in 10th grade, Grace went on to do a lot of impressive computer science research so that she could explore other areas in computer science. However, she still really enjoyed competitive programming and looks back fondly upon it as an exciting experience.

Q&A

If I’m a junior, and I’m shooting for USACO camp, what strategy should I use in Platinum Contests?

In the recent contests, USACO added a concrete list of subtasks for each problem, making contest strategy more important than ever. 

For a contest strategy, Grace recommends identifying and solving the easiest problem first, getting full credit if possible. This is because having a problem solved can greatly boost your confidence in solving the other two problems, which is essential for the mental game in contests. However, at first, it can be difficult to even identify which problem is the easiest and which ones are the harder problems, so how do you do it? Grace emphasizes the importance of thoroughly reading ALL of the problems and subtasks as soon as you begin, as it can give you great insights into the difficulties and potential solutions for all the problems. 

Furthermore, Grace suggests dedicating the first hour of the contest to reading the problems and then brainstorming solutions without actually coding anything up. This approach ensures that contestants don’t waste time on coding up easy subtasks, and instead spend the time trying to figure out the whole problem, which can save implementation time. However, it is also important to acknowledge the power of subtasks; if you are unable to find the full solution for a problem in a fixed time period, you should pivot to subtasks instead, as getting 40% on a problem and 60% on another puts you in the same spot as one full solve. In the end, finding a good balance between subtasks and the full solution is crucial. 

How do I continuously make progress on a problem in a contest even after I’m stuck?

Oftentimes, the situation arises that a contestant gets a lot of ideas about a problem in the first ten minutes thinking about it, and afterwards, makes little to no progress. For this common issue, Grace suggests two solutions. 

First, if you have been stuck on a problem for a good amount of time, switch problems. Thinking about another problem and then coming back can generate a lot of subconscious thoughts about the problem. Furthermore, your mind is more refreshed on the problem after switching and coming back, so you can potentially see perspectives that you hadn’t seen before, and solve the problem using these new insights.  

Second, think about different ideas and ways to approach the problem. It’s really easy for a competitor to get stuck in a loop where they keep trying to solve the problem using the idea they came up with first, thinking that the idea has led to part of a solution and that it must lead to the full solution as well. However, this is not optimal, as ideas that work for part of a problem can be a dead end for the rest. Thus, rethinking the problem and trying out different approaches can really help with getting unstuck. For generating different ideas for a problem, Grace recommends drawing out small test cases and breaking the problem down into subtasks, and exploring all the possible ways to solve them. 

Lastly, Grace emphasizes the importance of persistence. Even if you’re stuck for thirty minutes or an hour, with enough thinking, the right idea can always pop into your head. 

What are the best (free) resources for studying for USACO?

The best resources, and the ones that Grace used, are online problem libraries, in websites such as Codeforces, spoj, poj, etc. Furthermore, make sure to use these resources effectively by reading the solutions thoroughly and understanding why the solution works for problems that you were unable to solve. 

If you are worse at math, is it better to focus on math problems?  

Grace thinks that while math skills can be beneficial, they are not as critical as problem-solving abilities for USACO success. Many aspects of USACO require a distinct skill set, and a strong focus on problem-solving is paramount.

What is more effective, doing blind practice, or topic-based practice? 

Grace considers topic-based practice valuable for mastering specific problem-solving strategies. However, she also emphasized the importance of attempting random problems to assess adaptability and versatility in applying problem-solving skills. Thus, Grace recommends starting with topic-based practice to gain valuable algorithmic skills, and then transitioning to random practice to develop problem-solving skills. 

Conclusion

In conclusion, Grace Cai's insights and experiences provide invaluable guidance for USACO participants at all levels of proficiency. Her journey from the bronze division to platinum underscores the significance of dedication and continuous learning in the realm of competitive programming. Additionally, Grace invites those interested in art to visit her art Instagram account under the username "introoging", where she showcases her creative works. In parting, she encouraged all aspiring USACO students not to be discouraged by divisions or competition levels, emphasizing that hard work and perseverance can lead to rapid progress in competitive programming.