0) $input = $_GET['zatvorky']; else $input = 1; ?>
Počet párov zátvoriek:
print_statistics(); class Zatvorky { private $input, $time, $sum = 0; public function __construct($input) { $this->vstup = $input; $this->time = microtime(true); $this->generate($input, $input, ''); } public function generate($open, $close, $string) { if ($open > 0) $this->generate($open-1, $close, $string.'( '); if ($close > 0 && $open != $close) $this->generate($open, $close-1, $string.') '); if ($open == 0 & $close == 0) { $this->print_variant($string); $this->sum++; } } public function print_variant($string) { echo $string.'
'; } public function print_statistics() { echo ''; } } ?>