diff --git a/algorithmic/problems/11/chk.cc b/algorithmic/problems/11/chk.cc index b6ca9bd95..2bf90fea4 100644 --- a/algorithmic/problems/11/chk.cc +++ b/algorithmic/problems/11/chk.cc @@ -77,7 +77,7 @@ int main(int argc, char **argv){ pnt = max(pnt, 0.0); unbounded_pnt = pnt; } - char mes[30]; + char mes[128]; sprintf(mes, "Ratio: %lf, RatioUnbounded: %lf", pnt, unbounded_pnt); quitp(pnt, "%s", mes); } diff --git a/algorithmic/problems/210/chk.cc b/algorithmic/problems/210/chk.cc index 28054f31b..56b0cf33f 100644 --- a/algorithmic/problems/210/chk.cc +++ b/algorithmic/problems/210/chk.cc @@ -89,11 +89,14 @@ int main(int argc, char* argv[]) { for (int i = 0; i < nb; i++) { int x = inf.readInt(0, n - 1); int y = inf.readInt(0, m - 1); - long long g = inf.readLong(0LL, 1000LL); - long long c = inf.readLong(0LL, 2000LL); + long long g = inf.readLong(0LL, 1000000000LL); + long long c = inf.readLong(0LL, 1000000000LL); // Blue-side defense/value are unused; allow 0 for compatibility with released datasets. - long long d = inf.readLong(0LL, 10LL); - long long v = inf.readLong(0LL, 200LL); + // The statement gives no ranges for g/c/d/v, so the bounds are deliberately loose: the + // released 4.in-9.in carry v up to 250 (c up to 2000, d up to 10), and a tight [0,200] + // here made the checker FAIL on its own input before reading any contestant output. + long long d = inf.readLong(0LL, 1000000000LL); + long long v = inf.readLong(0LL, 1000000000LL); (void)d; (void)v; blue[keyXY(x, y)] = BlueBase{g, c}; @@ -104,11 +107,11 @@ int main(int argc, char* argv[]) { for (int i = 0; i < nr; i++) { int x = inf.readInt(0, n - 1); int y = inf.readInt(0, m - 1); - long long g = inf.readLong(0LL, 1000LL); - long long c = inf.readLong(0LL, 2000LL); + long long g = inf.readLong(0LL, 1000000000LL); + long long c = inf.readLong(0LL, 1000000000LL); // Some released datasets may contain 0 defense/value; allow it and treat as non-contributing. - long long d = inf.readLong(0LL, 10LL); - long long v = inf.readLong(0LL, 200LL); + long long d = inf.readLong(0LL, 1000000000LL); + long long v = inf.readLong(0LL, 1000000000LL); (void)g; (void)c; red[keyXY(x, y)] = RedBase{d, v}; diff --git a/algorithmic/problems/210/statement.txt b/algorithmic/problems/210/statement.txt index df5654869..78e41fc57 100644 --- a/algorithmic/problems/210/statement.txt +++ b/algorithmic/problems/210/statement.txt @@ -93,6 +93,7 @@ Constraints (from released datasets): - `1 ≤ G ≤ 1000` - `1 ≤ C ≤ 1000` +- For bases: `0 ≤ g ≤ 1000`, `0 ≤ c ≤ 2000`, `0 ≤ d ≤ 10`, `0 ≤ v ≤ 250` --- diff --git a/algorithmic/problems/22/checker.cpp b/algorithmic/problems/22/checker.cpp index 79081e00a..89d4fc0ca 100644 --- a/algorithmic/problems/22/checker.cpp +++ b/algorithmic/problems/22/checker.cpp @@ -119,7 +119,7 @@ int main(int argc, char* argv[]) { double ratio = max(0.0, min(1.0, 1.0 * (5 * N - K) / 2 * N)); double unbounded_ratio = max(0.0, 1.0 * (5 * N - K) / 2 * N); - char mes[30]; + char mes[128]; sprintf(mes, "Ratio: %lf, RatioUnbounded: %lf", ratio, unbounded_ratio); quitp(ratio, "%s", mes); }