CPIT: Competitive Programming Interface Tool

Revision en11, by CIXTEEN, 2024-08-14 00:31:45

Hi everyone!

I've been doing competitive programming for a while, and in that time, I've created different tools to help streamline my process. I have decided to release them publicly so that others can also use these tools, and I hope that some might find them helpful! This tool was mainly designed for the Codeforces platform and for C++ users, so some features might not work for other environments. To see the full description and instructions/installation, check out out the GitHub Repo.

Here is a preview for some of the tools provided:

Automatically test your code against samples

One of the cool features about this tool is the ability to test your code on sample test cases. Specifically, this tool will automatically check all files with .in and .out extensions in the directory you are currently in, then run those samples against your code, and print out any differences between your code's output and the expected sample output.

Parse sample input/output files from Codeforces

To pair with this feature, I also created another feature to parse the sample input/outputs on a Codeforces webpage, then download them locally into .in and .out files that can then be used with the previous checker command. On top of an individual problem, this feature can also parse all the problems of a contest, creating a subdirectory for each problem, with the corresponding sample input/outputs in that subdirectory (note: the parser seems to have trouble when Codeforces uses Cloudflare during contests, but this doesn't stop you from manually creating the .in and .out files if needed).

Get the rating of Codeforces problems

Another small tool is the ability to get the rating of a Codeforces problem in the terminal. Personally, I disable tags in Codeforces problems, which also includes the rating tag. This feature allows me to continue to disable tags, but be able to get the rating if I want to see it.

Thanks for reading, and I hope you find this tool helpful! I hope to continue improving CPIT and provide more features/tools to enhance convenience in competitive programming. Some ideas I have are adding support for different platforms and languages outside of C++, and fixing parsing issues when Codeforces uses Cloudflare during contests. I'm also to any other suggestions, so please let me know if you have any feedback!

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en11 English CIXTEEN 2024-08-14 00:31:45 1 Tiny change: 't the [Gitub Repo](h' -> 't the [GitHub Repo](h'
en10 English CIXTEEN 2024-08-13 23:35:02 0 (published)
en9 English CIXTEEN 2024-08-13 23:32:59 40
en8 English CIXTEEN 2024-08-13 23:25:03 87
en7 English CIXTEEN 2024-08-13 23:23:24 4 Tiny change: 'EN/CPIT). Here is a ' -> 'EN/CPIT). \n\nHere is a '
en6 English CIXTEEN 2024-08-13 23:23:07 51
en5 English CIXTEEN 2024-08-13 23:22:06 1 Tiny change: 'ut out the[Gitub Rep' -> 'ut out the [Gitub Rep'
en4 English CIXTEEN 2024-08-13 23:21:53 213
en3 English CIXTEEN 2024-08-13 23:19:58 1024
en2 English CIXTEEN 2024-08-13 23:13:01 1677
en1 English CIXTEEN 2024-08-13 23:03:13 440 Initial revision (saved to drafts)