]>
iEval git - gruntmaster-daemon.git/blob - lib/Gruntmaster/Daemon/Judge/Points.pm
1 package Gruntmaster
:: Daemon
:: Judge
:: Points
;
7 use Gruntmaster
:: Daemon
:: Constants qw
/AC REJ/ ;
8 use List
:: Util qw
/sum/ ;
9 use Log
:: Log4perl qw
/get_logger/ ;
11 our $VERSION = '5999.000_004' ;
13 ##################################################
16 no warnings qw
/numeric/ ;
17 get_logger
-> trace ( "Judging results: @_ " );
18 my $points = sum
0 , grep { ! ref } @_ ;
19 $points == 100 ?
( result
=> AC
, result_text
=> 'Accepted' ) : ( result
=> REJ
, result_text
=> " $points points" , points
=> $points )
29 Gruntmaster::Daemon::Judge::Points - 0 to 100 points IOI-style judge
33 use Gruntmaster::Daemon::Judge::Points;
34 Gruntmaster::Daemon::Judge::Points::judge($result1, $result2, $result3, ...);
38 Gruntmaster::Daemon::Judge::Points is a judge which adds up the given results and returns C<Accepted> if the final score is 100 points or C<X points> otherwise.
42 Marius Gavrilescu E<lt>marius@ieval.roE<gt>
44 =head1 COPYRIGHT AND LICENSE
46 Copyright (C) 2014 by Marius Gavrilescu
48 This library is free software: you can redistribute it and/or modify
49 it under the terms of the GNU Affero General Public License as published by
50 the Free Software Foundation, either version 3 of the License, or
51 (at your option) any later version.
This page took 0.047006 seconds and 4 git commands to generate.