<?php
$in_f=fopen('cinemaholics.in', 'r');
$Max=trim(fgets($in_f)); $Mel=trim(fgets($in_f));
fclose($in_f);
$Max=explode(' ', $Max); $Mel=explode(' ', $Mel);
function persTime($pers){ return $pers[0]*3+$pers[1]*20+$pers[2]*120; }
$MaxTime=persTime($Max); $MelTime=persTime($Mel);
if($MaxTime>$MelTime) $out='Max';
elseif($MaxTime<$MelTime) $out='Mel';
else $out='Draw';
$out_f=fopen('cinemaholics.out', 'w');
fputs($out_f, $out.PHP_EOL);
fclose($out_f);
Doesn't works on http://codeforces.net/gym/101110/problem/A , but nice works in my local PHP CLI.
I read FAQ and it was something about PHP & files & that it 'll not work, but I'm not sure.
[removed]
This comment is just hilarious, why are you donwvoting it?