7 foreach my $user (`cd testing && ls`) {
10 open REP, ">testing/$user/REPORT" or die;
11 print REP "Evaluation report for CEOI 2007 Day 2\n\n";
13 foreach my $task (@ARGV) {
14 print REP "### Task $task ###\n\n";
15 if (open PTS, "testing/$user/$task/points") {
20 my ($test, $pts, $comm) = /(\S+)\s+(\S+)\s+(.*)/;
22 $merged =~ s/[^0-9]//;
23 if (!defined($merged_pts{$merged}) || $merged_pts{$merged} > $pts) {
24 $merged_pts{$merged} = $pts;
26 $split_comm{$merged}{$test} = $comm;
30 foreach my $merged (sort { $a <=> $b } keys %merged_pts) {
31 printf REP "Test %2s: %2d points", $merged, $merged_pts{$merged};
32 $tt += $merged_pts{$merged};
33 my @k = sort keys %{$split_comm{$merged}};
35 print REP " -- ", $split_comm{$merged}{$k[0]}, "\n";
40 $cc++ and print REP ", ";
41 print REP "$t: $split_comm{$merged}{$t}";
46 print REP "\nTOTAL: $tt points\n\n";
50 print REP "No solution submitted.\n\n";
54 print REP "### TOTAL FOR DAY 2 ###\n\n";
55 print REP "$total points\n";
56 print REP "\n\n(generated on ", strftime("%Y-%m-%d %H:%M:%S", localtime), ")\n";