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.
- Host: GitHub
- URL: https://github.com/h-sinha/codeforces-hacking-script
- Owner: h-sinha
- Created: 2019-12-19T07:45:36.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T03:21:40.000Z (over 3 years ago)
- Last Synced: 2025-05-29T19:16:22.948Z (about 1 year ago)
- Topics: beautifulsoup4, chromedriver, codeforces, selenium
- Language: Python
- Homepage:
- Size: 28.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
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.