summaryrefslogtreecommitdiff
path: root/kpov_judge/tasks/custom_rdate
diff options
context:
space:
mode:
Diffstat (limited to 'kpov_judge/tasks/custom_rdate')
-rw-r--r--kpov_judge/tasks/custom_rdate/task.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/kpov_judge/tasks/custom_rdate/task.py b/kpov_judge/tasks/custom_rdate/task.py
index 3a72b5d..ee1e245 100644
--- a/kpov_judge/tasks/custom_rdate/task.py
+++ b/kpov_judge/tasks/custom_rdate/task.py
@@ -125,6 +125,7 @@ def task_check(results, params):
# print results
r = random.Random(params['PROGRAM_FILENAME'])
score = 0.0
+ hints = []
for i in xrange(10):
data = results['in_' + str(i)]
if data != struct.pack("!I", r.randint(0, 2**32)):
@@ -133,12 +134,14 @@ def task_check(results, params):
if str(struct.unpack("!I", data)[0]) == res.strip():
score += 0.5
else:
- pass
+ hints += ["wrong convert"]
# print str(struct.unpack("!I", data)[0]), res.strip()
if abs(int(results['ldate']) + \
int(params['RDATE_OFFSET']) - int(results['date'])) < 3:
score += 5
- return score
+ else:
+ hints += ["wrong offset"]
+ return score, hints
def prepare_disks(templates, params):
# d = templates['simpleArbiterDhcp']