Ejemplo n.º 1
0
Archivo: b.php Proyecto: dhad05/vnspoj
}
function update(&$M, &$L, $val, $num)
{
    if ($M < $val) {
        $M = $val;
        $L = $num;
        return;
    }
    if ($M == $val) {
        $L += $num;
        return;
    }
}
$numM[] = 0;
for ($i = 0; $i < 64; $i++) {
    if (self_check($i)) {
        $list[] = $i;
        $temp = 0;
        for ($j = 0; $j <= 5; $j++) {
            $temp += get($i, $j);
        }
        $numM[$i] = $temp;
    }
    for ($j = 0; $j < 64; $j++) {
        $check[$i][$j] = check($i, $j);
    }
}
$N = trim(fgets(STDIN));
$_A[] = 0;
while (!feof(STDIN)) {
    $_A[] = trim(fgets(STDIN));
Ejemplo n.º 2
0
    return $r;
}
/*
 * App Initialization
 */
// Determine the charset to use
$GLOBALS['charset'] = 'iso-8859-1';
// Set the internal encoding
if (function_exists('mb_internal_encoding')) {
    mb_internal_encoding($charset);
}
// Avoid problems with non-default arg_separator.output settings
// Credit for this goes to user 'prelog' on the forums
ini_set('arg_separator.output', '&');
// Do a check to be sure everything is set up correctly
self_check();
/**
 * Determine the HTTP request port
 * @name $port
 * @global integer $GLOBALS['port']
 */
$GLOBALS['port'] = isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on' && $_SERVER['SERVER_PORT'] == 443 || $_SERVER['SERVER_PORT'] == 80 ? '' : ':' . $_SERVER['SERVER_PORT'];
/**
 * Determine the HTTP request protocol
 * @name $proto
 * @global string $GLOBALS['proto']
 */
$GLOBALS['proto'] = isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on' ? 'https' : 'http';
// Set the authorization state - DO NOT OVERRIDE
$profile['authorized'] = false;
global $IDENTITY;