pacha2880's blog

By pacha2880, history, 13 months ago, In English

This is a continuation on my previous blog about reading problems.

In this blog I'll share my view on how to read problems in ICPC competitions as a team.

The Importance of Reading Problems Effectively

In a programming competition, it is crucial to read all the problems in the set and develop the ability to rank them by difficulty just by reading their statements and spending a few minutes thinking about or discussing them with teammates. Identifying the easiest problems as quickly as possible is an essential skill. One way to determine which problems are easy is by checking the scoreboard. However, relying on this method can lead to a habit of always being behind the top teams. Therefore, a more effective strategy is to identify the easy problems before other teams by reading through as many problem statements as possible early on.

Keeping a Problem Table

A helpful approach is to maintain a table divided according to the number of problems in the contest. If a team member has read a problem, they should mark it in the table and briefly note what it is about, which topic it covers, or what technique they believe is required to solve it. Additionally, they should estimate the apparent difficulty of the problem. If a problem seems very easy, it should be solved immediately. Once a problem is solved, it should also be marked in the table—simply crossing it out can make it clear that no further work is needed on that problem. This table helps teammates keep track of which problems have been read and solved and provides useful hints for deciding which problem to attempt next, based on the estimated difficulty or familiarity with the identified topic or technique.

The Challenge of Speed-Reading Problems

Teams that are not used to reading many problems consecutively may find themselves at a disadvantage compared to teams that can do this efficiently. The latter will have a higher chance of finding the easiest problems in a shorter amount of time.

Training Exercise for Efficient Problem Reading

To improve the speed and efficiency of problem reading, the following practice exercise is recommended:

  1. Participate in a contest or simulate one.

  2. Divide the problems among the team members based on the first, second, and third thirds of the problem set (it is preferable to keep these assignments fixed across different contests since ICPC problems are usually presented in a random order of difficulty).

  3. Set a strict time limit within which all problems must be read by at least one team member.

  4. Avoid checking the scoreboard and refrain from solving or coding any problem during this exercise.

  5. Read the problems as quickly as possible while still striving for maximum understanding.

  6. Record the relevant notes in the problem table as mentioned earlier.

  7. Once the time is up and all problems have been read, team members should discuss the problem difficulties and rank them in order of difficulty.

  8. After establishing an order, check the scoreboard to evaluate how accurate the team's predictions were.

  9. After the competition, assess how well the predictions matched reality.

Conclusion

By repeating this exercise as many times as necessary, a team can achieve significant improvements in both problem reading speed and accuracy in predicting problem difficulty, leading to better performance in real competitions.

Full text and comments »

  • Vote: I like it
  • +9
  • Vote: I do not like it

By pacha2880, history, 21 month(s) ago, In English

In this blog post, I will share my approach to reading problems during team competitions, such as ICPC. This method is how I personally tackle problem reading during competitions, but it doesn't necessarily mean that the entire team should follow this approach strictly.

I hope you find this useful :)

How to Read a Problem

In the context of competitive programming, particularly during a competition, problem reading can be categorized into three different methods depending on the speed:

Initial Scan of a Problem

Taking a quick glance at a problem can sometimes give hints about which problem to read first. The simplicity of the statement and the sample cases might suggest that it’s an easy problem. However, in some cases, these seemingly simple problems can turn out to be the most challenging. Ultimately, selecting the easiest problem after just an initial scan successfully comes with practice, but it doesn’t always work.

Quick Reading

A quick reading approach doesn’t involve deeply understanding every detail in the problem statement or how the test cases work. Rather, it’s about getting a general and precise idea of what the problem is about—what it provides and what it asks for. Focusing only on abstracting the basic information about the problem reduces the reading time, and reading in this way can be useful if you want to quickly read through a couple of problems to decide which one to invest time in. This can help you find an easy problem more quickly.

During a quick read, keep in mind the following details:

  • Identify if the initial paragraphs are a story unrelated to what the problem asks for (detect where the actual problem statement begins).
  • Pay attention to every instance where a number or variable appears.
  • Look for definitions or descriptions of procedures, which are often listed.
  • Pay close attention to the last sentences of the statement, as they usually summarize what the problem is asking for in a few words.
  • Pay attention to the limits provided in the input description, as this often hints at what techniques or algorithms can be applied to solve the problem.
  • Pay attention to the output description, as this also typically summarizes in a few words what the problem is asking for.

If you happen to come across one of the easier problems and read it quickly and lightly, with practice and experience, you might find a solution to the problem while reading it, even without paying much attention to unimportant details. (After much practice, this might also happen when you are just doing an initial scan of a problem.) Therefore, it is useful to develop a quick reading method that doesn't capture all the details but still tries not to miss the essential parts of the statement.

Detailed Reading

A detailed reading aims to obtain a deep understanding of the problem, ensuring that no detail escapes and that every sentence is read and thought through carefully—sometimes even read multiple times. It's a good practice to note down the most important details of the problem on a separate sheet of paper, such as the factors involved and the limits of the inputs. It's essential to pause every so often and ask yourself questions like:

  • What does this really mean?
  • Could this lead to a special case?
  • Could this detail be crucial for finding the solution to the problem?
  • Is this information useful?

It is crucial to question every possible detail and answer all the questions you can think of regarding the statement. A poor reading comprehension can lead to disastrous results. Failing to detect details or assuming things about the problem that are not specified in the statement results in solving a completely different problem and therefore losing valuable time.

Two key principles to keep in mind are:

  1. "If something is not written in the statement, it doesn't mean it's false."
  2. "If something is not written in the statement, it doesn't mean it's true."

It’s easy to make mistakes when making assumptions about the information detailed in the statement. A very common mistake is assuming that the input data is sorted in ascending order, just because the test cases are given that way, even though the statement does not specify this.

When to Apply Detailed Reading

Ideally detailed reading should always be done, but it is especially necessary when you understand that the problem is not easy and you have some respect for it. Additionally, it is mandatory to read the problem statement in detail after coding and receiving a "Rejected" verdict with no clear suspicion of what might have gone wrong. It is also recommended to re-read the problem if no solution idea comes to mind when looking for a solution. This allows you to perhaps find new details that were not recognized before.

Full text and comments »

  • Vote: I like it
  • +25
  • Vote: I do not like it

By pacha2880, history, 3 years ago, In English

What is the best way to solve this problem?, I have a solution in $$$O(n^4)$$$

Given are $$$N$$$ points $$$(x_i, y_i)$$$ in a two-dimensional plane. Find the minimum radius of a circle such that all the points are inside or on it.

Link to the problem https://atcoder.jp/contests/abc151/tasks/abc151_f

thanks in advance.

Full text and comments »

  • Vote: I like it
  • +5
  • Vote: I do not like it

By pacha2880, history, 6 years ago, In English

could someone please help me with this problem? given n circles (n <= 500000), count the number of circles that have a common point. it's guaranteed that the circles don't overlap.

here's the complete statement: http://coj.uci.cu/24h/problem.xhtml?pid=4161〈=es

thanks in advance

Full text and comments »

  • Vote: I like it
  • +5
  • Vote: I do not like it