Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion algorithmic/problems/11/chk.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
19 changes: 11 additions & 8 deletions algorithmic/problems/210/chk.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand All @@ -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};
Expand Down
1 change: 1 addition & 0 deletions algorithmic/problems/210/statement.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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`

---

Expand Down
2 changes: 1 addition & 1 deletion algorithmic/problems/22/checker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down