Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Egor batch create doesn't show useful results when main solution Crashes #80

Open
Eroui opened this issue Apr 3, 2021 · 1 comment · May be fixed by #82
Open

Egor batch create doesn't show useful results when main solution Crashes #80

Eroui opened this issue Apr 3, 2021 · 1 comment · May be fixed by #82

Comments

@Eroui
Copy link
Collaborator

Eroui commented Apr 3, 2021

Description

When running egor batch run, the user main solution is executed first against the generated input. If the solution fails for some the user cannot know what test case caused the solution to fail.

So if my solution is giving run time exception, there is no way to figure out what test case is causing it to crash.

how to reproduce

1- Write a main solution that crashes

  • Throw Exception
  • Exit -1 for example
    2- run egor batch create
    3- Write a generator
    4- Write a brute force solution
    5- run egor batch run

The result doens't contain any useful information other than my main solution failed and the error message if any.

Example of current output

$ egor batch r
Running test 1
Could not run the solution
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 5 out of bounds for length 5
	at Main.solve(Main.java:22)
	at Main.solve(Main.java:74)
	at Main.main(Main.java:81)

Example of better output

$ egor batch r
Running test 1
Main solution failed to run (RTE or TLE).
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 5 out of bounds for length 5
	at Main.solve(Main.java:22)
	at Main.solve(Main.java:74)
	at Main.main(Main.java:81)

Input:
1
4 9 64
1 2 6 10 13 14 16 20 21
2 3 10 14 17 18 21 25 29
4 7 11 18 19 23 24 28 30
8 9 12 20 24 26 30 33 34

Expected:
0
@chermehdi
Copy link
Owner

That makes sense, do you wanna take a look at fixing it?

@Eroui Eroui linked a pull request Apr 17, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants