Skip to content

Avuvos/CP-Stress-Tester

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Competitive-Programming-Stress-Tester

Stress Tester for Competitive Programming.
This is very useful when you have a code that gives wrong answer and you don't know why.
Write a brute force solution and compare it against your code, it will show you the testcases where you failed.

Instructions

  • Place the correct (but slow) brute force solution in the file brute_sol.cpp.
  • Place the optimal (but wrong) solution in the file optimal_sol.cpp.
  • Go to testcase_generator.py and modify the generate_and_print_testcase() function.
  • In your terminal, run ./mapper.sh 20 for example to run 20 testcases.

Example

Imagine the following simple and silly problem:
Given some n, print n if n <= 20 and otherwise print -1.
If for example our wrong code always outputs n no matter what, this is what will happen:

image

However if everything is working correctly, it will always look like this:
image

About

Stress Tester for Competitive Programming

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published