This repository has been archived by the owner on Dec 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 224
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 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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: