my $stop = str2time prompt 'Stop time' or die "Cannot parse time\n";
db->insert(contests => {id => $id, name => $name, owner => $owner, start => $start, stop => $stop});
+ purge '/ct/';
}
sub add_problem {
$options{tests} = encode_json \@tests if @tests;
db->insert(problems => \%options);
db->insert(contest_problems => {problem => $id, contest => $contest}) if $contest;
+ purge '/pb/';
}
1;