Hello Codeforces!
Being asked to propose competitive programming questions is pretty haunting. When you're out of fresh ideas, I used to do one of the two things. One, is to search in the old pile of problems, hoping to find some room of modifications and improvements. The second, is to come up with random words, like "chessboard inversion counting", and hopefully resemble interesting problems from them.
This process is pretty boring, so I have been trying to use machine learning to generate ideas and even complete competitive programming problems. The result is CPIdeas! Check it out here: https://fjzzq2002.github.io/cpideas/.
How was it made? I collected problems from AtCoder (ABC, ARC, AGC) and used these problems to fine-tune GPT-3, the OpenAI model. It's quite tricky to get things right though and it's still far from perfect.
How should I use it? Look through these ideas. Scroll down. Be tolerant and creative. That's it.
How should I use these ideas? For the generated ideas/problems, I would say probably do not use the ideas directly as problems (although you certainly can). Definitely use the search engine before actually purposing the problems. There are ~7000 shuffled ideas in the website at the moment so it's quite unlikely that multiple users worked on the same idea but that's certainly another risk.
Here are some sample ideas. They're not super logical, but hopefully pretty inspiring.
You are given a sequence of N integers A=(A1,A2,...,AN). Find the number of sequences that satisfy the following conditions, modulo 998244353. 1<=Ai<=M. There exists a permutation P=(P1,P2,...,Pk) of (1,2,...,k) such that Ai<=Pi and Pi!=Ai+1.
You are given an integer sequence of length N : A=(A1,A2,...,AN). You can do the following operation on A any number of times: choose an integer i such that 1<=i<=N-1, and replace the last element of A with ai. You want to make A a permutation of (1,2,...,N). Find the minimum number of operations needed.
You are given a string S of length N. Let the number of occurrences of each character in S be num1, num2,..., numN. Find the number of pairs of integers (i,j) that satisfy the following condition: 1<=i<j<=N, and |num1-numj|+|num2-numj|+...+|numN-i-j|<=1.
Hopefully you'll enjoy this little tool I made! If you have any thoughts/comments/suggestions you can comment below.
I prompted GPT-3 with the second problem, and it returned
No idea why it points to that blog post in particular :D
can it be extended to do Um_nik's problem database idea? I know nothing about ML https://mirror.codeforces.com/blog/entry/95956
To be honest I'm not a ML expert either so take my words with a grain of salt. I don't think my model will work — my model probably only knows about the structure of statements (how they "look like") or roughly what the statement is trying to convey, but cannot actually solve them. A model like AlphaCode might be capable of doing so though — if AlphaCode can solve some problem, it should understand it. We probably need to retrain or fine tune AlphaCode for the embeddings (which sounds really expensive!).
Very interesting, though I'm not sure if we'll be able to see actual original and logical ideas from this type of thing anytime soon.
Alternatively, if you like the more old school approach, you could just go through The Library of Babel until you find an interesting problem :D
[There was a mistake but it has been revised]
Auto comment: topic has been updated by TLE (previous revision, new revision, compare).
Short problem ideas are the best...
Proves my point that AtCoder problems are just "You are given some initial sequence, you can perform 69 possible operations to generate sequence set $$$S$$$, see if $$$x \in S$$$ or print $$$|S|$$$ mod 696969420"
First of all, thank you for the generated problem database! I'm sure it will help aspiring problemsetters.
That being said, is there any way to format the ideas into the form of a bullet-point list or something similar? Right now the site returns the raw result, with colored highlighting used as separators, which isn't exactly the best option for visibility.
I agree, it's pretty hard to read.
Of course it would be great if the author changed that, but in the meantime you can use my crude and disgusting code for one-time uses:
This is really nice! I'll steal your design in the next version :)
Update: this style has been implemented and the old style is also kept as an alternative.
Given are integers A, B, and C. Find the maximum possible value of A+B+C.
lolYou are given an integer N. How many integers between 1 and N (inclusive) are there?
Given are integers a and b. Find the maximum integer between a and b (inclusive).
Inspiring.