UVA

$d = dir("./uvahtml");
$problems = array();
while (false !== ($entry = $d->read())) { if ($entry != “.” && $entry != “..” && $entry != “highlight.css”) $problems[] = substr($entry, 0, -8); }
sort($problems);
echo “

“;
$i=0;
foreach ($problems as $problem) {
echo “

“;
$details = mysql_fetch_array (mysql_query(“SELECT * FROM `uva_problems` WHERE `pid`=’”.$problem.”‘”));
$link = “http://icpcres.ecs.baylor.edu/onlinejudge/external/”.((int)($problem/100)).”/”.$problem.”.html”;
if (!$details) $details['pid'] = $problem;
echo “

“;
echo “

\n”;
$i++;
}
echo “

PId Name Category Solution
“.$details['pid'].” “.$details['pname'].” “.$details['pcat'].” Solution

“;
echo ($i+1).” solutions.
“;
?>

2 thoughts on “UVA

Leave a Reply to Priyanka Chatterjee Cancel reply

Your email address will not be published. Required fields are marked *


× 5 = twenty

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>