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 :

- Think about the data structure(like an array, string, tree, etc...) on which I want to build a problem.
- Explore some fresh ideas or use some previous idea in a different way.
- Do mathematical modeling of the problem and try to find a brute force solution.
- 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.
- 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.
- Adjust the constraints according to my optimized solution and examine the corner case.
- Prepare a statement for it.
- I build test-case in such a way that all the cases are covered.

### Test-Case Generator :

- I am using C++ for generating test-cases.
- I used a single file which first generates input and then output.
- I select the number of input files and number of test-cases in each file.
- 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.

- Generate input and output. This differs for different problems.

### Difficulties :

**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.**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.**Less Optimised Author Solution**— Sometimes the author solution has more time complexity than the contestants' solution. This does not generally occur but causes issues.**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.**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.