An open API service indexing awesome lists of open source software.

https://github.com/h-sinha/codeforces-hacking-script

Automates the process of hacking solutions in Codeforces Educational rounds.
https://github.com/h-sinha/codeforces-hacking-script

beautifulsoup4 chromedriver codeforces selenium

Last synced: about 2 months ago
JSON representation

Automates the process of hacking solutions in Codeforces Educational rounds.

Awesome Lists containing this project

README

          

# Codeforces Hacking Script
Automates the process of hacking solutions in Codeforces Educational rounds.
# Requirements
Refer to [requirements.txt](../master/requirements.txt)
# How to use?
* Enter your test case in input.txt.
Note
* Avoid using extra spaces/newline in the end
* The maximum size of the test file can be 256KB due to upload limit on codeforces
* Enter expected output in output.txt
* If the problem requires custom checker(e.g.- Case insensitive) then update the Checker function in [checker.py](../master/checker.py). The current checker does character by character matching.
* Run the script using
```
python3 main.py
```

* Enter your codeforces handle, password, contest id and problem id
```
Enter your handle/email = coder_h
Enter password = ************
Enter contest id = 1283
Enter problem id = C
```
# How it works?
* The script fetches all the accepted submissions for the problem.
* Runs each code on the given test case using Codeforces' custom invocation.
* Compares the expected output and output given by the code.
* If the outputs don't match, the script hacks the solution.

# Note
* The script runs in background. If you wish to see how it actually works, comment line no. 20 in main.py.