{"source_code": " 0){\n if($number % 10 == 0){\n $number /= 10;\n }\n else{\n $number--;\n }\n }\n return $number;\n}\n\nfunction main()\n{\n $data = fread(STDIN, 4096);\n list($num, $k) = explode(\" \", $data);\n echo wrong_subtraction(intval($num), intval($k));\n}\n\nmain();", "src_uid": "064162604284ce252b88050b4174ba55"} {"source_code": " $x[$i+1]) {\n $answer = max($answer, $x[$i] - $c - $x[$i+1]);\n }\n}\n\nprint $answer;\n\nfunction get_line() {\n return trim(fgets(STDIN));\n}\n", "src_uid": "411539a86f2e94eb6386bb65c9eb9557"} {"source_code": "\n$f = file('php://stdin',FILE_IGNORE_NEW_LINES);\ndefine('L',PHP_EOL);\n//-----------------------\n\n$pts = explode(' ',$f[1]);\n\nif (sizeof($pts)<3) {\n\tif ($pts[0] == $pts[1]) {\n\t\techo 'yes';\n\t} else {\n\t\techo 'no';\n\t}\n\texit;\n}\n\nif ($pts[0] < $pts[1]) {\n\t$max_left = $pts[0];\n\t$max_right = $pts[1];\n} else {\n\t$max_left = $pts[1];\n\t$max_right = $pts[0];\n}\n$p = $pts[1];\n$pp = $pts[0];\n\nif ($pp==$p) {\n\techo 'yes';\n\texit;\n}\n\nfor ($i=2;$i<$f[0];$i++) {\n\t$c = $pts[$i];\n\n\tif ($c==$p || isset($lim_left) && $c >= $lim_left && $c <= $lim_right) {\n\t\techo 'yes';\n\t\texit;\n\t}\n\n\t$change = $c < $p && $p > $pp || $c > $p && $p < $pp;\n\n\tif ($change) {\n\t\tif ($nout) {\n\t\t\tif ($c > $p && $pp > $p && $c < $pp || $c < $p && $pp < $p && $c > $pp) {\n\t\t\t\tif ($c > $p) {\n\t\t\t\t\t$max_left = $p;\n\t\t\t\t} else {\n\t\t\t\t\t$max_right = $p;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\techo 'yes';\n\t\t\t\texit;\n\t\t\t}\n\t\t} else {\n\t\t\tif ($c > $p && $pp > $p && $c < $pp || $c < $p && $pp < $p && $c > $pp) {\n\t\t\t\t$nout = true;\n\t\t\t\tif ($c < $p) {\n\t\t\t\t\tif ($lim_right)\n\t\t\t\t\t\t$max_left = $lim_right;\n\t\t\t\t} else {\n\t\t\t\t\tif ($lim_left)\n\t\t\t\t\t\t$max_right = $lim_left;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($c < $max_left && $p==$max_right) {\n\t\t\t\t\t$lim_left = $max_left;\n\t\t\t\t\t$max_left = $c;\n\t\t\t\t\t$lim_right = $p;\n\t\t\t\t} elseif ($c > $max_right && $p==$max_left) {\n\t\t\t\t\t$lim_right = $max_right;\n\t\t\t\t\t$max_right = $c;\n\t\t\t\t\t$lim_left = $p;\n\t\t\t\t} else {\n\t\t\t\t\techo 'yes';\n\t\t\t\t\texit;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\tif ($nout) {\n\t\t\tif ($c > $max_left && $c < $p || $c < $max_right && $c > $p) {\n\n\t\t\t\tif ($c > $max_left && $c < $p)\n\t\t\t\t\t$max_right = $p;\n\t\t\t\telseif ($c < $max_right && $c > $p)\n\t\t\t\t\t$max_left = $p;\n\t\t\t} else {\n\t\t\t\techo 'yes';\n\t\t\t\texit;\n\t\t\t}\n\t\t} else {\n\t\t\tif ($c > $p) {\n\t\t\t\t$max_right = $c;\n\t\t\t\t$lim_right = $p;\n\t\t\t\t$lim_left = $max_left;\n\t\t\t} else {\n\t\t\t\t$max_left = $c;\n\t\t\t\t$lim_left = $p;\n\t\t\t\t$lim_right = $max_right;\n\t\t\t}\n\t\t}\n\t}\n\t$pp = $p;\n\t$p = $c;\n}\n\n\necho 'no';", "src_uid": "f1b6b81ebd49f31428fe57913dfc604d"} {"source_code": " $max) {\n $max = $map[$twoGramm];\n $result = $twoGramm;\n }\n }\n return $result;\n}\n\n$n = intval(fgets(STDIN));\n$s = trim(fgets(STDIN));\nprint solution($s);\n", "src_uid": "e78005d4be93dbaa518f3b40cca84ab1"} {"source_code": " 0) {\n $check = false;\n }\n }\n if ($check) echo \"YES\";\n else echo \"NO\";", "src_uid": "b6456a39d38fabcd25267793ed94d90c"} {"source_code": "", "src_uid": "5551742f6ab39fdac3930d866f439e3e"} {"source_code": "", "src_uid": "e167dc35a0d3b98c0414c66099e35920"} {"source_code": " -1) {\n if ($a[$i] == $b[$j]) {\n $right[$j--] = $i;\n }\n $i--;\n }\n\n // Result is either distance from last char of the first substring to the end of \n // the string [length - last index of first substring ] or\n // distance from start to the first char of the last substring, [first index of last substring]\n // distance between $first[$i-1] to $last[$i] - 1 (index from 0). [between chars]\n $longestSequence = max($aLen- $left[$bLen - 1] - 1, $right[0]);\n for ($k=1; $k<$bLen; $k++) {\n $longestSequence = max($longestSequence, $right[$k] - $left[$k-1] - 1);\n }\n return $longestSequence;\n}\n\nfunction main() {\n $string = readline();\n $subString = readline();\n echo longestSubstring($string, $subString);\n}\n\nmain();\n?>", "src_uid": "0fd33e1bdfd6c91feb3bf00a2461603f"} {"source_code": "= 0; $x--)\n{\n if(($a[$x] != 0) && ($a[$x] != 1))\n {\n $e = array_slice($a, 0, $x);\n $f = $a[$x] - 1;\n $e = array_merge($e, array($f));\n for($y = $x + 1; $y < count($a); $y++)\n {\n $e[count($e)] = 9;\n }\n $g = array_product($e);\n if($g > $d)\n {\n $d = $g;\n }\n $a = $a2;\n }\n}\nprint max($b, $c, $d);\n?>", "src_uid": "38690bd32e7d0b314f701f138ce19dfb"} {"source_code": "\n", "src_uid": "a6e9405bc3d4847fe962446bc1c457b4"} {"source_code": "\", trim(fgets(STDIN)));\n\n\t$d += ($t[0] == $home);\n\t$a += ($t[1] == $home);\n}\n\nif($d == $a)\n echo \"home\";\nelse\n echo \"contest\";", "src_uid": "51d1c79a52d3d4f80c98052b6ec77222"} {"source_code": " $c)\n {\n break;\n }\n else\n {\n $d[count($d)] = $f;\n $f += $a;\n }\n}\nwhile(TRUE)\n{\n if($g > $c)\n {\n break;\n }\n else\n {\n $e[count($e)] = $g;\n $g += $b;\n }\n}\n$h = array_intersect($d, $e);\nprint count($h);\n?>", "src_uid": "e7ad55ce26fc8610639323af1de36c2d"} {"source_code": "= $b[$x] * 2)\n {\n $c[count($c)] = $x + 1;\n $e += $b[$x];\n unset($b[$x]);\n }\n};\nif($e > $d / 2)\n{\n print count($c) . \"\\n\";\n print implode(\" \", $c);\n}\nelse\n{\n print \"0\";\n}\n?>", "src_uid": "0a71fdaaf08c18396324ad762b7379d7"} {"source_code": "", "src_uid": "a661b6ce166fe4b2bbfd0ace56a7dc2c"} {"source_code": "\n define (\"TEST\", false); \n if (TEST) $GLOBALS['file'] = fopen('input.txt', 'r');\n else $GLOBALS['file'] = fopen('php://stdin', 'r'); \n function debug($var){echo '
'; print_r($var); echo '';}\n function read_str(){return trim(fgets($GLOBALS['file']));}\n function read_array(){return explode(' ', read_str());}\n /***************************************************************/\n \n $arr = read_array();\n $n = $arr[0];\n $k = $arr[1];\n \n $min = $n - ceil($n/$k);\n $max = $n;\n \n function timeForVloop($v, $k)\n {\n $res = floor($v/$k);\n if($res>0) return $res + timeForVloop($res, $k);\n else return 0;\n }\n \n function timeForV($v ,$k)\n {\n return $v + timeForVloop($v, $k);\n }\n \n $v = $min;\n do\n { \n $v++;\n $time = timeForV($v, $k);\n \n } while ($time<$n);\n \n \n echo $v;\n \n //echo timeForV(54,9);\n?>", "src_uid": "41dfc86d341082dd96e089ac5433dc04"} {"source_code": " 0){\n $dist -= 2*$r;\n $res++;\n}\n\necho $res.\"\\n\";", "src_uid": "698da80c7d24252b57cca4e4f0ca7031"} {"source_code": " $v) {\n if ($v == 0) {\n unset($a[$k]);\n }\n }\n funcMax($a, max($a), array());\n function funcMax($a, $max, $count) {\n $count[] = $max;\n foreach ($a AS $key => $val) {\n if ((int)$val == (int)$max) {\n unset($a[$key]);\n }\n }\n if ($a) { \n funcMax($a, max($a), $count);\n } else {\n echo count($count);\n }\n }\n \n?>", "src_uid": "3b520c15ea9a11b16129da30dcfb5161"} {"source_code": "0) {\n if (substr($string, 0, 2)==='-.') {\n $result.='1';\n $string = substr($string, 2);\n }\n else if (substr($string, 0, 2)==='--') {\n $result.='2';\n $string = substr($string, 2);\n }\n else if (substr($string, 0, 1)==='.') {\n $result.='0';\n $string = substr($string, 1); \n }\n else break;\n}\necho $result;\n?>", "src_uid": "46b5a1cd1bd2985f2752662b7dbb1869"} {"source_code": "=(int)TenToTwo($i)){\n $ans+=1;\n }else{\n break;\n }\n}\nprint($ans.\"\\n\");\n?>", "src_uid": "64a842f9a41f85a83b7d65bfbe21b6cb"} {"source_code": "= $max) {\n $max = $int;\n }\n}\n\n$count = $m;\n$maxCount = 0;\n\nwhile($count > 0 && $maxCount < $n)\n{\n $maxCount = 0;\n\n for($i = 0; $i < $n && $count > 0; $i++)\n {\n if($list[$i] < $max)\n {\n $list[$i]++;\n $count--;\n }\n else\n {\n $maxCount++;\n }\n }\n}\n\necho $max + ceil($count / $n), ' ', $max + $m;\n", "src_uid": "78f696bd954c9f0f9bb502e515d85a8d"} {"source_code": " $b) {\n\t\t$s = $a - $b;\n\t\twhile ($a != $b) {\n\t\t\t$a--;\n\t\t\t$c++;\n\t\t\t$k = $k + $c;\n\t\t\tif ($a != $b) {\n\t\t\t\t$b++;\n\t\t\t\t$d++;\n\t\t\t\t$k = $k + $d;\n\t\t\t}\n\t\t}\n\t\techo $k;\n\t} else {\n\t\t$s = $b - $a;\n\t\twhile ($a != $b) {\n\t\t\t$a++;\n\t\t\t$c++;\n\t\t\t$k = $k + $c;\n\t\t\tif ($a != $b) {\n\t\t\t\t$b--;\n\t\t\t\t$d++;\n\t\t\t\t$k = $k + $d;\n\t\t\t}\n\t\t}\n\t\techo $k;\n\t}\n?>", "src_uid": "d3f2c6886ed104d7baba8dd7b70058da"} {"source_code": " $now) $ans = $now;\n }\n}\n\necho $ans\n\n?>", "src_uid": "d13c7b5b5fc5c433cc8f374ddb16ef79"} {"source_code": " 0; $t --) {\r\n $n = intval(trim(fgets(STDIN)));\r\n\r\n echo 100 / gcd($n, 100).\"\\n\";\r\n\r\n\r\n}", "src_uid": "19a2bcb727510c729efe442a13c2ff7c"} {"source_code": "", "src_uid": "4e57740be015963c190e0bfe1ab74cb9"} {"source_code": " 1 || $zc > $xc) {print 'illegal'; exit(0);}\n\n$win1 = false; $win2 = false;\n\nif($f1 === 'XXX' || $f2 === 'XXX' || $f3 === 'XXX' || $f1[0].$f2[0].$f3[0] === 'XXX' || $f1[1].$f2[1].$f3[1] === 'XXX' || $f1[2].$f2[2].$f3[2] === 'XXX' || $f1[0].$f2[1].$f3[2] === 'XXX' || $f1[2].$f2[1].$f3[0] === 'XXX') $win1 = true;\n\nif($f1 === '000' || $f2 === '000' || $f3 === '000' || $f1[0].$f2[0].$f3[0] === '000' || $f1[1].$f2[1].$f3[1] === '000' || $f1[2].$f2[2].$f3[2] === '000' || $f1[0].$f2[1].$f3[2] === '000' || $f1[2].$f2[1].$f3[0] === '000') $win2 = true;\n\nif($win1 && $win2) {print 'illegal'; exit(0);}\n\nif($win1 && ($zc == $xc)) {print 'illegal'; exit(0);}\n\nif($win2 && (($zc + 1) == $xc)) {print 'illegal'; exit(0);}\n\nif($win1 && !$win2) {print 'the first player won'; exit(0);}\n\nif(!$win1 && $win2) {print 'the second player won'; exit(0);}\n\nif(!$win1 && !$win2 && ($xc + $zc) == 9) {print 'draw'; exit(0);}\n\nif($xc > $zc) {print 'second'; exit(0);}else{print 'first'; exit(0);}\n\n?>", "src_uid": "892680e26369325fb00d15543a96192c"} {"source_code": " $a [1])\n$x=$a [1];\nelse\n$x=$a [0];\n$s=1;\n\nfor ($i=2; $i <=$x; $i++)\n$s=$s*$i;\n\necho $s;\n\n\n?>", "src_uid": "7bf30ceb24b66d91382e97767f9feeb6"} {"source_code": " 0) {\n if($s % 10 != 4 && $s % 10 != 7) \n return false;\n $s = intval($s / 10);\n }\n return true;\n}\n\nfscanf(STDIN, \"%s\", $s);\necho islucky(substr_count($s, '4') + substr_count($s, '7')) ? \"YES\" : \"NO\";", "src_uid": "33b73fd9e7f19894ea08e98b790d07f1"} {"source_code": "", "src_uid": "5ebfad36e56d30c58945c5800139b880"} {"source_code": "", "src_uid": "f838fae7c98bf51cfa0b9bd158650b10"} {"source_code": "=ord(\"a\")?$cnt++:\"\";\necho $cnt>=(strlen($s)-$cnt)?strtolower($s):strtoupper($s); \n?>", "src_uid": "b432dfa66bae2b542342f0b42c0a2598"} {"source_code": " $unit) {\n break;\n }\n if ($j === $n - 1) {\n $flgLucky = true;\n }\n }\n }\n // var_dump($flgLucky);\n}\n\necho $flgLucky ? \"YES\" : \"NO\";\n", "src_uid": "410296a01b97a0a39b6683569c84d56c"} {"source_code": "= 0) {\n\t\tif ($d[$a] >= 0) {\n\t\t\tarray_push($b, $d[$a]);\n\t\t} else {\n\t\t\tarray_push($c, $d[$a]);\n\t\t}\n\t\t$a--;\n\t}\n\techo (array_sum($b) - array_sum($c));\n?>", "src_uid": "4b5d14833f9b51bfd336cc0e661243a5"} {"source_code": " $b){\n $iCount += $b*2 + 1;\n} elseif($a < $b) {\n $iCount += $a*2 + 1;\n} elseif($a == $b){\n $iCount += $a*2;\n}\necho $iCount;", "src_uid": "609f131325c13213aedcf8d55fc3ed77"} {"source_code": "\nfunction read() {\n return trim(fgets(STDIN));\n}\n\n/*–––––––––––––––––––––––––––––––––––––––––––––––––––––––*/\n\n$n = read();\n$str = read();\n\n$i = 0;\n$j = 0;\nwhile ($i < $n) {\n echo substr($str, $i, 1);\n $j++;\n $i += $j;\n}\n", "src_uid": "08e8c0c37b223f6aae01d5609facdeaf"} {"source_code": "\n", "src_uid": "098ade88ed90664da279fe8a5a54b5ba"} {"source_code": "", "src_uid": "01b50fcba4185ceb1eb8e4ba04a0cc10"} {"source_code": "", "src_uid": "8ab25ed4955d978fe20f6872cb94b0da"} {"source_code": "", "src_uid": "ba6ff507384570152118e2ab322dd11f"} {"source_code": "", "src_uid": "95cb79597443461085e62d974d67a9a0"} {"source_code": " $value) {\n if (!$array1[$key]) continue;\n if (($value % $prime == 0) and ($value != $prime)) $array1[$key] = false;\n if (($value % $prime == 0) and ($value == $prime)) $array1[$key] = true; \n }\n }\n return $array1;\n}\n\n$res = toPrime($nums, $act);\n\nforeach ($res as $key => $value) {\n if ($value) $primes[] = $nums[$key];\n}\n\n$almostPrimes = array();\n\nfor ($i = 6; $i <= $number; $i++) {\n if (!in_array($i, $primes)) {\n $primeIndex = 0;\n $divisorsCount = 0;\n $j = $i;\n while ($primes[$primeIndex] <= $j && $primes[$primeIndex] < $i) {\n if ($j % $primes[$primeIndex] == 0) {\n //echo $j.$primes[$primeIndex].\"\\n\";\n $divisorsCount++;\n if ($divisorsCount > 2) {\n break;\n }\n $j /= $primes[$primeIndex];\n }\n $primeIndex++;\n }\n if ($divisorsCount == 2) $almostPrimes[] = $divisorsCount;\n }\n}\n\necho(count($almostPrimes)).\"\\n\";\n\n?>", "src_uid": "356666366625bc5358bc8b97c8d67bd5"} {"source_code": " 1) {\n\t\t$res = ($n % 2) . $res;\n\t\t$n = ($n - ($n % 2)) / 2;\n\t}\n\t$res = $n . $res;\n\t$res = str_repeat(\"0\", $dig - strlen($res)) . $res;\n\treturn $res;\n}\n\nfor ($i = 1; $i <= 9; $i++) {\n\tfor ($j = 1; $j <= 9; $j++) {\n\t\t$nums[] = str_repeat($i, $j);\n\t}\n}\n$nums[] = \"1000000000\";\n\nfor ($len = 2; $len <= 9; $len++) {\n\tfor ($i = 1; $i < pow(2, $len) - 1; $i++) {\n\t\t$j = tobin($i, $len);\n\t\tfor ($x = 1; $x <= 9; $x++) {\n\t\t\tfor ($y = 0; $y < $x; $y++) {\n\t\t\t\tif (($y != 0) || (substr($j, 0, 1) == \"1\")) {\n\t\t\t\t\t$s = \"\";\n\t\t\t\t\tfor ($k = 0; $k < strlen($j); $k++) {\n\t\t\t\t\t\t$s .= (substr($j, $k, 1) == \"1\" ? $x : $y);\n\t\t\t\t\t}\n\t\t\t\t\t$nums[] = $s;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n$raw = g();\n$n = $raw[0];\n\n$ct = 0;\nforeach ($nums as $val) {\n\tif ($n >= $val) {$ct++;}\n}\n\necho $ct;\n\n// End of submission file\n// Submission by chaotic_iak\n?>", "src_uid": "0f7f10557602c8c2f2eb80762709ffc4"} {"source_code": "", "src_uid": "5ecd569e02e0164a5da9ff549fca3ceb"} {"source_code": "$d){\n echo \"-1\";\n}else{\n $j = floor(($d-$s)/5) + ($n-1)*2;\n echo \"$j\";\n}\n", "src_uid": "b16f5f5c4eeed2a3700506003e8ea8ea"} {"source_code": "", "src_uid": "d0f5174bb0bcca5a486db327b492bf33"} {"source_code": "", "src_uid": "8a8013f960814040ac4bf229a0bd5437"} {"source_code": ">1)die(strval($m-1));\nprint($m>$n+1>>1?$m-1:$m+1);", "src_uid": "f6a80c0f474cae1e201032e1df10e9f7"} {"source_code": " 3 * $c or $a > $b + $c) {\n if ($b + $c > 3 * $c) {\n echo 3 * $c;\n }else echo $b + $c;\n }else echo $a; \n\n}elseif ($x == 3) {\n if ($a + $b > $c and $c < (3 * $a)) {\necho $c; \n}elseif ($b + $a < (3 * $a)) {\n \n echo $a + $b;\n}else echo 3 * $a;\n \n}elseif ($x == 2) {\n if ($b < (2 * $a) and $b < 2 * $c) {\n echo $b;\n }elseif (2 * $c < $x * $a) { echo 2 * $c; }else echo $x * $a ;\n}\n\n?>", "src_uid": "c74537b7e2032c1d928717dfe15ccfb8"} {"source_code": " $value) {\n if ($sum+$arr[$key] > $k)\n break; \n $sum += $arr[$key];\n $o[] = $key+1; \n}\necho count($o).\"\\n\";\nfor ($i = 0; $i < count($o); $i++) {\n echo $o[$i].\" \"; \n}\n?>", "src_uid": "dbb164a8dd190e63cceba95a31690a7c"} {"source_code": "0 && isset($a[$x])){\n $count++;\n $k-=$a[$x];\n $x++;\n}\n\nif ($k>0){\n $count = -1;\n}\n\necho $count;\n\n", "src_uid": "59dfa7a4988375febc5dccc27aca90a8"} {"source_code": " 0){\n // $sum += $number % 10;\n // $number /= 10;\n // }\n $number = strval($number);\n for($x = 0; $x < strlen($number); $x++)\n {\n $sum += $number[$x];\n }\n return $sum;\n}\n\nfscanf(STDIN, \"%d\\n\", $k);\n$i = 2;\n$prefect = 19;\nwhile($k > 0){\n if(decompose($prefect) == 10){\n $k--;\n }\n if($k == 0) break;\n $prefect += 9;\n}\necho $prefect;", "src_uid": "0a98a6a15e553ce11cb468d3330fc86a"} {"source_code": "", "src_uid": "7725f9906a1b87bf4e866df03112f1e0"} {"source_code": "=$mod)\n break;\n}\necho $i+1;\n?>", "src_uid": "007a779d966e2e9219789d6d9da7002c"} {"source_code": " $primes[$length-1] ) {\n break;\n }\n if (in_array($primes[$i] + $primes[$i+1] + 1,$primes)) {\n $count++;\n }\n}\nif ($count>=$k) {\n echo 'YES';\n} else {\n echo 'NO';\n}\n", "src_uid": "afd2b818ed3e2a931da9d682f6ad660d"} {"source_code": "in();\n\n\t$s_arr = str_split($s);\n\trsort($s_arr);\n\n\t$first = $s_arr[0];\n\t$ans = $first;\n\t\n\tfor ($i = 1; $i < count($s_arr); $i++)\n\t{\n\t\tif ($first === $s_arr[$i]) $ans .= $first;\n\t\telse break;\n\t}\n\n\tprintf($ans);\n}\n\nclass Input{\n\tprivate $handle = \"\";\n\tprivate $values = array();\n\tprivate $index = 0;\n\n\tpublic function __construct($localfile){\n\n\t\tif (is_file($localfile)) {\n\t\t\t\n\t\t\t$this->handle = fopen($localfile, \"r\");\n\t\t\t$contents = stream_get_contents($this->handle);\n\t\t\n\t\t} else {\n\t\t\n\t\t\t$contents = stream_get_contents(STDIN);\n\t\t\n\t\t}\n\t\t\n\t\t$no_newlines = str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\"), \" \", $contents);\n\t\t$this->values = explode(\" \", $no_newlines);\n\t}\n\t\n\tpublic function in(){\n\t\n\t\treturn $this->values[$this->index++];\n\t\n\t}\n\t\n\tpublic function close(){\n\t\t\n\t\tif (is_file($localfile) && feof($this->handle)) fclose($this->handle);\n\t\t\n\t}\n}\n\n?>", "src_uid": "9a40e9b122962a1f83b74ddee6246a40"} {"source_code": "= 3)\n{\n $e++;\n $b[\"n\"] -= 3;\n $e += floor($b[\"n\"] / 2);\n}\nelse\n{\n $e = 0;\n}\n$f = floor($b[\"t\"] / 1);\n$g = $b[\"n\"] % 3;\nprint min($c, $d, $e, $f);\n?>", "src_uid": "bb433cdb8299afcf46cb2797cbfbf724"} {"source_code": "= 0; $y--)\n {\n $h = $e[$x];\n $g[$y][$x] = $h[$y];\n }\n}\n$i = array();\nfor($x = 3; $x >= 0; $x--)\n{\n $j = $g[$x];\n $i[count($i)] = $j;\n}\nfor($x = 0; $x < 4; $x++)\n{\n for($y = 0; $y < 2; $y++)\n {\n if(($i[$x][$y] == \"x\") && ($i[$x][$y + 1] == \"x\") && ($i[$x][$y + 2] == \".\"))\n {\n $f = 1;\n break;\n }\n }\n for($y = 0; $y < 2; $y++)\n {\n if(($i[$x][$y] == \".\") && ($i[$x][$y + 1] == \"x\") && ($i[$x][$y + 2] == \"x\"))\n {\n $f = 1;\n break;\n }\n }\n for($y = 0; $y < 2; $y++)\n {\n if(($i[$x][$y] == \"x\") && ($i[$x][$y + 1] == \".\") && ($i[$x][$y + 2] == \"x\"))\n {\n $f = 1;\n break;\n }\n }\n}\nif(($e[0][1] == \"x\") && ($e[1][2] == \"x\") && ($e[2][3] == \".\"))\n{\n $f = 1;\n}\nelseif(($e[0][1] == \".\") && ($e[1][2] == \"x\") && ($e[2][3] == \"x\"))\n{\n $f = 1;\n}\nelseif(($e[0][1] == \"x\") && ($e[1][2] == \".\") && ($e[2][3] == \"x\"))\n{\n $f = 1;\n}\nelseif(($e[0][0] == \"x\") && ($e[1][1] == \"x\") && ($e[2][2] == \".\"))\n{\n $f = 1;\n}\nelseif(($e[1][1] == \"x\") && ($e[2][2] == \"x\") && ($e[3][3] == \".\"))\n{\n $f = 1;\n}\nelseif(($e[0][0] == \"x\") && ($e[1][1] == \".\") && ($e[2][2] == \"x\"))\n{\n $f = 1;\n}\nelseif(($e[1][1] == \"x\") && ($e[2][2] == \".\") && ($e[3][3] == \"x\"))\n{\n $f = 1;\n}\nelseif(($e[0][0] == \"x\") && ($e[1][1] == \".\") && ($e[2][2] == \"x\"))\n{\n $f = 1;\n}\nelseif(($e[1][1] == \".\") && ($e[2][2] == \"x\") && ($e[3][3] == \"x\"))\n{\n $f = 1;\n}\nelseif(($e[1][0] == \"x\") && ($e[2][1] == \"x\") && ($e[3][2] == \".\"))\n{\n $f = 1;\n}\nelseif(($e[1][0] == \".\") && ($e[2][1] == \"x\") && ($e[3][2] == \"x\"))\n{\n $f = 1;\n}\nelseif(($e[1][0] == \"x\") && ($e[2][1] == \".\") && ($e[3][2] == \"x\"))\n{\n $f = 1;\n}\nelseif(($e[0][2] == \"x\") && ($e[1][1] == \"x\") && ($e[2][0] == \".\"))\n{\n $f = 1;\n}\nelseif(($e[0][2] == \".\") && ($e[1][1] == \"x\") && ($e[2][0] == \"x\"))\n{\n $f = 1;\n}\nelseif(($e[0][2] == \"x\") && ($e[1][1] == \".\") && ($e[2][0] == \"x\"))\n{\n $f = 1;\n}\nelseif(($e[0][3] == \"x\") && ($e[1][2] == \"x\") && ($e[2][1] == \".\"))\n{\n $f = 1;\n}\nelseif(($e[0][3] == \".\") && ($e[1][2] == \"x\") && ($e[2][1] == \"x\"))\n{\n $f = 1;\n}\nelseif(($e[0][3] == \"x\") && ($e[1][2] == \".\") && ($e[2][1] == \"x\"))\n{\n $f = 1;\n}\nelseif(($e[1][2] == \"x\") && ($e[2][1] == \".\") && ($e[3][0] == \"x\"))\n{\n $f = 1;\n}\nelseif(($e[1][2] == \"x\") && ($e[2][1] == \".\") && ($e[3][0] == \"x\"))\n{\n $f = 1;\n}\nelseif(($e[1][2] == \".\") && ($e[2][1] == \"x\") && ($e[3][0] == \"x\"))\n{\n $f = 1;\n}\nelseif(($e[1][3] == \"x\") && ($e[2][2] == \"x\") && ($e[3][1] == \".\"))\n{\n $f = 1;\n}\nelseif(($e[1][3] == \".\") && ($e[2][2] == \"x\") && ($e[3][1] == \"x\"))\n{\n $f = 1;\n}\nelseif(($e[1][3] == \"x\") && ($e[2][2] == \".\") && ($e[3][1] == \"x\"))\n{\n $f = 1;\n}\nif($f == 1)\n{\n print \"YES\";\n}\nelse\n{\n print \"NO\";\n}\n?>", "src_uid": "ca4a77fe9718b8bd0b3cc3d956e22917"} {"source_code": "", "src_uid": "76c8bfa6789db8364a8ece0574cd31f5"} {"source_code": "$value)\n{\n if ($value == 'halfplus')\n {\n $total = ($total + 0.5)*2;\n //print_r($total.'-');\n $count++;\n }\n else\n {\n $total = $total*2;\n }\n}\n\n\n$price = ($p*$total) - (($p*$count)/2);\n\n\nprintf('%.0f', $price);", "src_uid": "6330891dd05bb70241e2a052f5bf5a58"} {"source_code": " $m)\n swap($n, $m);\n \n if ($n & 1)\n fprintf($fo, \"Akshat\");\n else\n fprintf($fo, \"Malvika\");\n \n fclose($fi);\n fclose($fo);\n?>", "src_uid": "a4b9ce9c9f170a729a97af13e81b5fe4"} {"source_code": "", "src_uid": "c2e3aced0bc76b6484360563355d23a7"} {"source_code": "= min($c[$x], $i[$x])) && ($a <= max($c[$x], $i[$x])) && ($b >= min($f[$x], $l[$x])) && ($b <= max($f[$x], $l[$x])))\n {\n break;\n }\n}\nprint $x;\n?>", "src_uid": "2fb2a129e01efc03cfc3ad91dac88382"} {"source_code": " 0) ? _merge(array_values($a)) : $a;\n}\n\n$n = trim(fgets(STDIN));\n$arr = array_fill(0, $n, 1);\n$o = _merge($arr);\n\nfor($i=0; $i