CPIdeas: use AI to generate competitive programming ideas

Revision en1, by TLE, 2022-06-30 19:31:55

Hello Codeforces!

Being asked to purpose 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.

Tags deep-learning, make-problems, gibberish-generator, cyberpunk

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English TLE 2022-07-01 04:34:54 2 fixed typo, thanks!
en1 English TLE 2022-06-30 19:31:55 2443 Initial revision (published)