summaryrefslogtreecommitdiff
path: root/kpov_judge/tasks/custom_rdate
diff options
context:
space:
mode:
authorgasperfele@fri1.uni-lj.si <gasperfele@fri1.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414>2015-04-01 20:32:28 +0000
committergasperfele@fri1.uni-lj.si <gasperfele@fri1.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414>2015-04-01 20:32:28 +0000
commit53fea983a90447865c429c2573bfb36cba179054 (patch)
tree42a0fa57a43103378144607d16e575e82071f7e1 /kpov_judge/tasks/custom_rdate
parent2fe40ec78ce6ab3a8c2c5659713b7f947a5686fc (diff)
added hints to task results
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@296 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
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']