-
Notifications
You must be signed in to change notification settings - Fork 219
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
Warn of non standard IO while running cf test #52
Comments
I think it makes more sense to warn in the Possible patch: (will not work if Codeforces change the HTML format) diff --git a/client/parse.go b/client/parse.go
index c562bce..4b8f0e1 100644
--- a/client/parse.go
+++ b/client/parse.go
@@ -9,6 +9,7 @@ import (
"path/filepath"
"regexp"
"strings"
+ "bytes"
"sync"
"github.com/fatih/color"
@@ -66,6 +67,11 @@ func (c *Client) ParseProblem(URL, path string) (samples int, err error) {
return
}
+ if !bytes.Contains(body, []byte(`<div class="input-file"><div class="property-title">input</div>standard input</div><div class="output-file"><div class="property-title">output</div>standard output</div>`)) {
+ color.Yellow("Non standard input output format")
+ }
+
+
for i := 0; i < len(input); i++ {
fileIn := filepath.Join(path, fmt.Sprintf("in%v.txt", i+1))
fileOut := filepath.Join(path, fmt.Sprintf("ans%v.txt", i+1)) |
That only warns you when parsing. |
I'll add some warns when parsing |
There are problems with italic input/output specifier such as https://codeforces.com/gym/102354/problem/B , but is still standard input/output. |
lmao haaaaaaaaha |
Consider this question: https://codeforces.com/problemset/problem/35/D It uses non-standard IO.
Far too many times I find myself running
cf submit
immediately aftercf test
passes. It would be useful ifcf test
would warn me that the problem requires non-standard IO, so that I would add the correspondingfreopen
statements to my C++ source code before submitting the code instead of getting a RE on test 1.The text was updated successfully, but these errors were encountered: