-Omar_Hafez-'s blog

By -Omar_Hafez-, 4 weeks ago, In English

بسم الله الرحمن الرحيم

Hello, I would like to introduce The Competitive Programming tool. It provides several useful features for competitive programming.

Test your code for testCases:

You can test your code for several test cases at the same time and you can load the test cases supplied in the problem automatically just by paste the link of the problem in the tool and let it load the test cases for you (This work for Codeforces, Atcoder, Hakerearth)

Screenshot-from-2021-09-26-17-44-45

Submit your solution:

This tool can also submit your solution automatically to your account from the tool itself and load the results of your submission (Accepted, Wrong answer, ..etc) (This work for codeforces.com and atcoder.jp)

Screenshot-from-2021-09-26-17-49-07 Screenshot-from-2021-09-26-17-49-24 Screenshot-from-2021-09-26-17-54-16

Save you solutions:

This will take a copy of your solution and save it in a folder with a name depending on the link of the problem And this process happens automatically once your submission gets Accepted. This feature may be useful for some users

Screenshot-from-2021-09-26-18-10-11

Nice colorful output section:

Nice detailed output section that explains where exactly your error in the code and also gives you feedback about the time and memory taken by your code for each test case

Screenshot-from-2021-09-26-18-11-35

Encrypt your username and password:

This tool will Encrypt your username and password and store them. (This process is needed to log in into your accounts to submit your solution)

Screenshot-from-2021-09-26-18-16-18

Works for C++, Python, and Java:

I will add to it in the future some other programming language.

How to use it:

You will need to put your code files in the CODE folder. (in CODE folder you will find C++ folder, Java folded, and Python folder to put your code in them) Then write the name of your file down right textBox (without the extension of the file i.e. A not A.cpp or A.java or A.py just A)

Then chose the language that you use from the upper right ComboBox.

to submit, save or load test cases, press F1 (Please make sure to take a look at the shortcuts.txt file that contain all the shortcuts in it)

Installation:

There is no need to install anything just download this folder and double-click on the Competitive_Programming.jar file to open it! This program is written in Java so please make sure to have java installed on your machine. And also please make sure that you have Chrome browser installed and updated.

If you faced "An error occurred" when submitting your solution please check the version of your chrome browser and then go to this website and download the chrome driver of your chrome browser version (This just about 7 MB only) then replace the file chromedriver in src folder (or chromedriver.exe for windows) with the new one

UPDATE: 2021/10/04 I updated the fonts with better fonts. Please make sure to install the fonts used from the folder "FONTS TO INSTALL" before starting the program.

UPDATE: 2021/10/11 Simple bugs fixed. The bug makes the program unable to load the results when submitting to atcoder for the first time for the contest. And the bug that makes it unable to submit a solution to codeforces once you change the programming language that you use.

Please don't remove or rename any file or folder (except the code files in the CODE folder).

Download (last update 2021/10/11)

This Tool work for Linux(Ubuntu) and Windows

Source code

This is the source code of this tool. And there are no copyrights on it so you can update it and make your own version and share it (for free) with the community but please don't forget to mention me in it.

If you faced any errors please let me know in the comments. I spend a lot of time writing this program and debug it so I expect that it will work without any errors with you.

Hope you find this useful. Thanks a lot for reading.

 
 
 
 
  • Vote: I like it
  • +78
  • Vote: I do not like it

»
4 weeks ago, # |
  Vote: I like it +4 Vote: I do not like it

It looks fine, but how do we know we can trust it. like you won't steal people's accounts or something

  • »
    »
    4 weeks ago, # ^ |
    Rev. 2   Vote: I like it +24 Vote: I do not like it

    Nice qusetion. I don't collect any data from this program and i dont know who used it and how. To make sure from this point you can decomplie the program (the jar file, you can use any java decomplier and there are alot of java decompilers online) and read its source code if you find my program collect any data you can simply take screen shot of that and tell the comunity here.

    • »
      »
      »
      3 weeks ago, # ^ |
        Vote: I like it +3 Vote: I do not like it

      why don't you just provide the source code yourself?

      • »
        »
        »
        »
        3 weeks ago, # ^ |
        Rev. 2   Vote: I like it +7 Vote: I do not like it

        sohxm7 If I Collect some data from this, I will easily omit the code that does this from the source code that I will share! So decompiling the program is the convenient way to do this.

        • »
          »
          »
          »
          »
          3 weeks ago, # ^ |
            Vote: I like it 0 Vote: I do not like it

          yeah fair enough, but I'd still suggest to open source it, since it can open up some collaboration and/or just a project for someone to study. Anyway will try your app :)

          • »
            »
            »
            »
            »
            »
            3 weeks ago, # ^ |
              Vote: I like it 0 Vote: I do not like it

            I am not sure if I uploaded it correctly to GitHub or not because This is my first time sharing my java projects on Github Anyway this is the link of the project on Github

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Seems a very good program, but to be brutally honest cpbooster is a similar project that is way better.

  • »
    »
    4 weeks ago, # ^ |
    Rev. 3   Vote: I like it +7 Vote: I do not like it

    Every competitive programmer should know the benefit of competitions as a whole. It makes both parties showcase their best. It's just a matter of choice/preference. Are you against that?

  • »
    »
    4 weeks ago, # ^ |
    Rev. 2   Vote: I like it +4 Vote: I do not like it

    Majin_Boo What makes cpbooster is better? I think this program is faster and easier to use than anything I tried before. submission in cpbooster is quite slow and it doesn't have a nice GUI like this. If there is a tool that behaves better than this I will not spend all this time and effort to make this work! especially that I worked on this without any support or help from others. It is just one personal effort not a group of programmers like cpbooster

»
4 weeks ago, # |
  Vote: I like it +3 Vote: I do not like it

Can anyone who downloaded this tell me did it work with him or found any errors? Thanks in advance.

  • »
    »
    4 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Yes actually on windows we generate a.exe file not a.out file also the window output size is way longer to fit inside the screen.

    • »
      »
      »
      4 weeks ago, # ^ |
      Rev. 4   Vote: I like it 0 Vote: I do not like it

      OiNishant Please send me the content of logs.txt file

      • »
        »
        »
        »
        4 weeks ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        Started in 2021/09/27 19:26:21 java.io.FileNotFoundException: C:\Users\Nishant Singh\Downloads\Compressed\Competitive_Programming\Competitive_Programming\src\logins\ac.txt (The system cannot find the file specified) at java.base/java.io.FileInputStream.open0(Native Method) at java.base/java.io.FileInputStream.open(FileInputStream.java:212) at java.base/java.io.FileInputStream.(FileInputStream.java:154) at java.base/java.io.FileReader.(FileReader.java:75) at com.company.Competitive_Programming.readFile(Competitive_Programming.java:162) at com.company.Competitive_Programming.load_login(Competitive_Programming.java:145) at com.company.Competitive_Programming.check_login(Competitive_Programming.java:138) at com.company.Competitive_Programming.main(Competitive_Programming.java:104) java.io.FileNotFoundException: C:\Users\Nishant Singh\Downloads\Compressed\Competitive_Programming\Competitive_Programming\src\logins\acc.txt (The system cannot find the file specified) at java.base/java.io.FileInputStream.open0(Native Method) at java.base/java.io.FileInputStream.open(FileInputStream.java:212) at java.base/java.io.FileInputStream.(FileInputStream.java:154) at java.base/java.io.FileReader.(FileReader.java:75) at com.company.Competitive_Programming.readFile(Competitive_Programming.java:162) at com.company.Competitive_Programming.load_login(Competitive_Programming.java:146) at com.company.Competitive_Programming.check_login(Competitive_Programming.java:138) at com.company.Competitive_Programming.main(Competitive_Programming.java:104) java.lang.NullPointerException at com.company.AES.decrypt(AES.java:56) at com.company.Competitive_Programming.load_login(Competitive_Programming.java:149) at com.company.Competitive_Programming.check_login(Competitive_Programming.java:138) at com.company.Competitive_Programming.main(Competitive_Programming.java:104) java.lang.NullPointerException at com.company.AES.decrypt(AES.java:56) at com.company.Competitive_Programming.load_login(Competitive_Programming.java:149) at com.company.Competitive_Programming.check_login(Competitive_Programming.java:138) at com.company.Competitive_Programming.main(Competitive_Programming.java:104)

  • »
    »
    4 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    You should set window size as per screen height it is exceeding making it difficult to run, (Also I am not able it to resize so that I can fix that run issue, and again as I told you it is not working with a.exe files showing error that a.out file is not found.

  • »
    »
    4 weeks ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    Hey, this is great, but can you try to parse the link of the problem from some extension like competitive companion in that way it would be faster, also on some problems while parsing it says an error occurred. Still Great efforts!!

    • »
      »
      »
      4 weeks ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      "An error occurred" In most cases, this problem happens because the version of your chrome browser does not suit the version of the chrome driver in the program. please update your chrome browser and go to this website and download the chrome driver that suits the version of your chrome browser. and then unzip it and replace it with the chromedriver file in your program.

      Thanks for commenting. I will make a lot of updates in the future to make it as fast and efficient as possible for competitive programmers

»
4 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

I came all way down to find that it doesn't work in mac

»
4 weeks ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Hello, Some users messaged me about a bug that happen when they run their code, The error is that the program can't find the file to run (Whatever the language they use)

Why this happened? This happens when the local path of the code file on your pc has a space in it (for example D:\my path\my file) and this caused that bug. I solved this by adding a double-quotation around any local path (Whatever Windows or Linux) and this solved this issue

I updated the program (and the link) with the bug fixed.

I am so sorry for that and hope no one face any bugs once again. Thanks,

»
3 weeks ago, # |
Rev. 3   Vote: I like it 0 Vote: I do not like it

UPDATE 2: Hello, I fixed the "Stupid bug" that makes the program not stop the last process(The code you run or test) before starting a new one or close the program. This bug happened because I forget to implement the function Stop_Process().

I am so sorry for that. I updated the links with the new one and also added a new shortcut to stop the code you testing and running in the background. (cntrl + B)

How this may help you?

I hope you download the new update

Thanks a for reading.

»
3 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

How to add custom flags and use it with some other browser (Brave)

  • »
    »
    3 weeks ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    prabhav_ Unfortunately this is not available now. I wrote and tested it to run using chrome WebDriver which depends on the chrome browser. Anyway, you can use any browser you want but it's important to keep chrome browser installed on your system.