rishup132's blog

By rishup132, 5 years ago, In English

Hello Codeforces

I like to create problems and I want to hear some of your suggestions in order to improve my methods. I am describing the way I start preparing a problem. It is divided into two phases as mentioned below.

Creating a Problem :

  1. Think about the data structure(like an array, string, tree, etc...) on which I want to build a problem.
  2. Explore some fresh ideas or use some previous idea in a different way.
  3. Do mathematical modeling of the problem and try to find a brute force solution.
  4. Start to go deep and find an optimized solution in terms of time complexity and space complexity which solves the problem less than brute force solution.
  5. Find a mathematical proof to the solution. If I find proof then replace brute force solution with it and repeat the process 4 until I reach the best solution.
  6. Adjust the constraints according to my optimized solution and examine the corner case.
  7. Prepare a statement for it.
  8. I build test-case in such a way that all the cases are covered.

Test-Case Generator :

  1. I am using C++ for generating test-cases.
  2. I used a single file which first generates input and then output.
  3. I select the number of input files and number of test-cases in each file.
  4. There are a total of three types of test-cases -
  • Hand-made -> to include corner cases.
  • Small -> to examine the solution's correctness using a brute force solution.
  • Large -> to cover the test-cases which gives time-limit-exceeded.
  1. Generate input and output. This differs for different problems.

Difficulties :

  1. Originality — Let suppose you making a problem or working on some idea and somehow you find out that the problem already exists but this is not the challenge, the challenge is if you find out after the contest or some contestant complain about it.
  2. Weak Test-Cases — This is a very major issue. Many times you write a test-case for a problem but it is not that much strong that you are willing and might be you left some of the good test-cases, that gives some issues like AC on the wrong submission, AC on unoptimized code etc.
  3. Less Optimised Author Solution — Sometimes the author solution has more time complexity than the contestants' solution. This does not generally occur but causes issues.
  4. Likeness — In general we make a problem and we do not know whether this problem is liked by the majority of people or not. Or they found some educational in the problem.
  5. Difficulty — Sometimes it happened what is easy for us might be tough for others and vice versa. Also, the difficulty level we assign to some problem is far away from what comes after the contest based on submissions.

I just want to know how to overcome these difficulties.

If all works fine then the problem is prepared and now the time to give it to someone for testing from where you get feedback and improve either problem statement or generator code.

The post Way of problemssetting is very useful for me to improve my problem setting skills. I am attaching one of the recent problems which I made in RECode 5.0 contest hosted by RECursion NITDgp.

Problem Link
Test-Case Generator Link
Solution Link

Thanks in advance.

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