Skip to content

Commit

Permalink
hack memory limit
Browse files Browse the repository at this point in the history
iceboy233 committed Sep 15, 2018
1 parent 24186e5 commit dd5de76
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions jd4/case.py
Original file line number Diff line number Diff line change
@@ -246,10 +246,10 @@ def read_legacy_cases(config, open):
num_cases = int(config.readline())
for line in islice(csv.reader(config, delimiter='|'), num_cases):
input, output, time_str, score_str = line[:4]
#try:
# memory_bytes = int(float(line[4]) * 1024)
#except (IndexError, ValueError):
memory_bytes = DEFAULT_MEMORY_BYTES
try:
memory_bytes = int(float(line[4]) * 1024)
except (IndexError, ValueError):
memory_bytes = DEFAULT_MEMORY_BYTES
yield DefaultCase(partial(open, path.join('input', input)),
partial(open, path.join('output', output)),
int(float(time_str) * 1000000000),
@@ -262,7 +262,7 @@ def read_yaml_cases(config, open):
yield DefaultCase(partial(open, case['input']),
partial(open, case['output']),
parse_time_ns(case['time']),
parse_memory_bytes(case['memory']),
parse_memory_bytes(case['memory']) * 10,

This comment has been minimized.

Copy link
@twd2

twd2 Sep 16, 2018

Member

???

This comment has been minimized.

Copy link
@iceboy233

iceboy233 Sep 16, 2018

Author Contributor

This is for julia using 90MB memory for A+B problem. This is experimental-only and not meant to be checked in.

int(case['score']))
else:
yield CustomJudgeCase(partial(open, case['input']),

0 comments on commit dd5de76

Please sign in to comment.