### variety-jones's blog

By variety-jones, 4 months ago,

cfstress.com

CF Stress is a highly customizable, no-code tool to stress test Codeforces problems.

You control all the parameters of the generator without writing a single line of code. Feeling lazy and want to pin down the error to an array of length 5? You can do that by adjusting the flags passed to the generator. Feeling adventurous and want to test your logic on test cases of length 1000? There's an option for that too. There's also a builtin diff checker for when you want to compare the output of large test cases. You can also seamlessly copy the input/output to your local machine.

Just plug in your submission ID and wait for the ticket to be processed.

It also has support for non-unique answers and interactive problems. The testcases are generated using testlib, the framework that's used to create the original test set.

Note: It only supports C++ and Python submissions for now. (For Java, I could not figure out how to make the name of the file the same as the class name).

A Sample Result

If this proves to be useful, I'll add more features, such as user accounts to view tickets in one place, emailing the user on successful completion of the ticket, better concurrency support to handle multiple tickets, revamped UI, etc.

If you have any feedback/suggestions, or if you'd like to collaborate, please let me know in the comments (or drop me an email).

• +126

 » 4 months ago, # |   +8 Website is down rn.
•  » » 4 months ago, # ^ |   0 Fixed.
•  » » » 4 months ago, # ^ |   +8 Down again :D
•  » » » » 4 months ago, # ^ |   0 Fixed again.
 » 4 months ago, # |   +11 It's not working for recent contests, like if I put 1631 E it does nothing
 » 4 months ago, # |   +13 It seems like it would be super cool to have this in general, but the amount of work it would require to accurately create generators for all problems on CF is insane and not really feasible to expand in general without a colossal amount of work being put into it. From my testing, it only works on a handful of rounds. For instance: https://codeforces.com/contest/1627/problem/E doesn't work in the generator at all, and this was the first test I did.
•  » » 4 months ago, # ^ |   +5 Yeah, fair enough. Although I should've mentioned in the blog that I don't really intend to support older problems, I've already created CF Debug (currently offline) for that which tells you the smallest testcase from the existing test-set on which your submission fails. However, it's not effective for problems with multiple test cases, the recent norm on Codeforces.It only supports contests that happened after it was launched (i,e 22nd January, 2022 onwards). The plan was (and is) to update the generator repo a day or two after the contest ends. Considering the frequency of CF contests, I don't think it'd require more than 1 hour commitment per contest, as I already have templates prepared for array, trees, graphs, etc. Creating a good generator that covers corner cases is tricky, but creating a naive one that is correct should not take much time, I believe. It's a stress test after all.Depending upon the usefulness, I also plan to make at least the generator repo open-source. In that case, all we need is just 1 participant contributing a generator per problem, and the benefits can be reaped by many.
 » 4 months ago, # |   +4 Update: Added Contest 768 and made some minor improvements to the site: Querying for Java submissions should now correctly display an error, rather than displaying the last stored test case. The status page should now display the last ticket number. If a counter example could not be found, the result would be displayed instantly upon completion, (previously it was only displayed once a valid ticket was processed). Upon failures, help message to increase the constraints are displayed.
 » 3 months ago, # |   +2 Update: Made some improvements to the site and added new features: The time limit for a single stress test has been reduced to 1 minute per submission (Earlier it was 3 minutes, which caused unnecessary delays if you accidentally enter an AC submission). A new feature of getting additional sample test cases for every problem has been added. The sample test case display page should now only display the Input and Expected Output (and not "Your output" and "Diff"). It also has new help messages for getting alternate counter examples.
 » 3 months ago, # |   +1 Why website is down :(
•  » » 3 months ago, # ^ |   +1 Will need to investigate, but fixed for now.
•  » » » 3 months ago, # ^ |   0 website down now.
•  » » » » 3 months ago, # ^ |   +1 Really? Seems to be working for me. (And the logs do not indicate any failure). Can you describe the exact issue that you faced?
 » 3 months ago, # | ← Rev. 2 →   0 Its working...
 » 3 months ago, # |   0 Tried changing parameters but did not get a test case on CF stress [1539D] which fails 146434582 Got wrong ans on test 8 for this.
•  » » 3 months ago, # ^ |   0 Changing $x$ to $x + 1$ is not what I meant by tuning the parameters. You need to be a bit more creative.This problem only contains a single array, and you've already deduced that choosing small $n$ and small $a[i]$ as flags produces no counter example. You could try choosing large $n$ and large $a[i]$, but you already have a failing test case on CF with these constraints. Plus you wont' be able to dry run it, even if you get the test case.Now, if you set the flags as large $n$ and small $a[i]$, you would still not be able to dry run it, even if you get a failing test case.So that leaves us with picking small $n$ and large $a[i]$ as flags. And sure enough, it gives a very simple counter example, as evident from Ticket 408. This produces a testcase of type 2 c b d a where $a < b < c < d$ with answer $2*a + c + (d - a)$
•  » » » 3 months ago, # ^ | ← Rev. 2 →   0 Thanks! I found a very small error and got AC which I wouldnt have found by myself imo.
 » 5 weeks ago, # |   0 Thanks a lot for creating this awesome website .
 » 2 weeks ago, # |   0 Update: I received some comments that the site was not able to retrieve submissions from Codeforces.The issue has now been resolved, thanks to woshiluo's PR for cf-tool.
 » 6 days ago, # |   0 Does this not work without logging in? And how to reset password if you don't remember?
•  » » 6 days ago, # ^ |   0 Yes, I've made some recent changes. I'm migrating the site to a freemium model.Currently, there's no way to reset a password. I'll add this feature soon.If you can DM me the email that you used for registering, I'll update the backend, and you can register again with the same email.