From: Marius Gavrilescu Date: Tue, 14 Jan 2014 09:26:46 +0000 (+0200) Subject: Slightly improve gruntmaster-problem and add it to EXE_FILES X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=1bbb36988a5487b17f7994a334d3f5a7e3e2ca26;p=gruntmaster-page.git Slightly improve gruntmaster-problem and add it to EXE_FILES --- diff --git a/Makefile.PL b/Makefile.PL index 4e2fa24..9c22e69 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -4,7 +4,7 @@ use ExtUtils::MakeMaker; WriteMakefile( NAME => 'Gruntmaster::Page', VERSION_FROM => 'lib/Gruntmaster/Page.pm', - EXE_FILES => [ qw/gruntmaster-genpage gruntmaster-genallpages/ ], + EXE_FILES => [ qw/gruntmaster-genpage gruntmaster-genallpages gruntmaster-problem/ ], ABSTRACT_FROM => 'lib/Gruntmaster/Page.pm', AUTHOR => 'Marius Gavrilescu ', MIN_PERL_VERSION => '5.14.0', diff --git a/gruntmaster-problem b/gruntmaster-problem index 32e8e2b..611235f 100755 --- a/gruntmaster-problem +++ b/gruntmaster-problem @@ -27,7 +27,7 @@ sub cmd_add{ my $contest = prompt 'Contest'; local $Gruntmaster::Data::contest = $contest if $contest; my $name = prompt 'Problem name'; - my $level = prompt 'Problem level'; + my $level = prompt 'Problem level', -menu => "beginner\neasy\nmedium\nhard"; my $statement = read_file prompt 'File with problem statement', -complete => 'filenames'; my %meta; $meta{generator} = prompt 'Generator', -menu => "File\nRun\nUndef"; @@ -35,6 +35,12 @@ sub cmd_add{ $meta{judge} = prompt 'Judge', -menu => "Absolute\nPoints"; $meta{testcnt} = prompt 'Test count', '-i'; + $meta{timeout} = prompt 'Time limit (seconds)', '-n'; + delete $meta{timeout} unless $meta{timeout}; + $meta{olimit} = prompt 'Output limit (bytes)', '-i'; + delete $meta{olimit} unless $meta{olimit}; + say 'Memory limits are broken, so I won\'t ask you for one'; + if ($meta{generator} eq 'File') { my $prefix = prompt '[Generator::File] Input file prefix'; $meta{infile}[$_ - 1] = read_file "$prefix$_.in" for 1 .. $meta{testcnt};