{"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "bd5ea952f346b02b9f0aaf82882244ed", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0} {"lang": "PHP", "source_code": "\ufeff", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "0c1e85a77852433852ddbccd6d6f04ec", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0} {"lang": "PHP", "source_code": " asdf\n [1] => asdf\n [2] => --help\n [3] => --dest=/var/\n [4] => -asd\n [5] => -h\n [6] => --option mew arf moo\n [7] => -z\n )\n */\n\n $ret = array(\n 'input' => array(),\n 'commands' => array(),\n 'flags' => array()\n );\n\n foreach ( $args as $arg ) {\n\n // Is it a command? (prefixed with --)\n if ( substr( $arg, 0, 2 ) === '--' ) {\n\n $value = preg_split( '/[= ]/', $arg, 2 );\n $com = substr( array_shift($value), 2 );\n $value = join($value);\n\n $ret['commands'][$com] = !empty($value) ? $value : true;\n continue;\n\n }\n\n // Is it a flag? (prefixed with -)\n if ( substr( $arg, 0, 1 ) === '-' ) {\n $ret['flags'][] = substr( $arg, 1 );\n continue;\n }\n\n $ret['input'][] = $arg;\n continue;\n\n }\n\n return $ret;\n}\n\nprint_r( arguments( $argv ) );\n\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "57b7572f89199eaa57d727c258198e88", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "09864c629466987079ae695be3fbd11f", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "a258888465f122a73a8226ba25178667", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "17acf92b235df5a9896fb52e2b41acb3", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0} {"lang": "PHP", "source_code": ">16)$result;\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "465f2d1a6a7556834b14bd8b33db84f7", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "493762bfdc5d54294e9cda2b88eaf5d4", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "1d2b0da37251ec7911c4966046f0c53c", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "e11d869de428c90d579e9860e5dd73f3", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "0e56af58c3f89707c4eae937216622df", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "31f7fb29451cf239a43040912f951286", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "d8860a54f893541939ac99abe8dd481d", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "d7b3375a63d7291f72239c95178a74b2", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "772849e7ad1081839814147946bcebbd", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "7abdfe2cd82545df91bd1a782bf920cb", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0} {"lang": "PHP", "source_code": "\ufeff", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "0317598bb077b4d0928f8bfa15845471", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "dba847326b0a96cd18fb2d53af56e2c5", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "ea76061439920a97d996f0289b16747e", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "c8e46043a7c8bf6caf8dfaaa38561cf0", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "d03bc526a8f5b380db0ff8e14ed41cac", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "6be031c7c5f428be7d7cb4dc065f5d6e", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0} {"lang": "PHP", "source_code": ">16)$result;\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "1fb88eba8875e92c8508bd4e878fc54a", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "bf00871c98010dd6a0d117ad3ece1f45", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0} {"lang": "PHP", "source_code": " ", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "7b313ace1b7dac4145e12441c20caca2", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "bcd095abc2052832e6cd4b137c96074a", "src_uid": "ef971874d8c4da37581336284b688517", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "79a692eed14f5c3f1dab34dd01c8e939", "src_uid": "78cf8bc7660dbd0602bf6e499bc6bb0d", "difficulty": 1000.0} {"lang": "PHP", "source_code": " 0)\n{\n print \"YES\";\n}\nelse\n{\n print \"NO\";\n}\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "a90258438be16c1ab9d32f391b3ac344", "src_uid": "78cf8bc7660dbd0602bf6e499bc6bb0d", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "ff2ee6afad259624098ecdd6cd58ca63", "src_uid": "78cf8bc7660dbd0602bf6e499bc6bb0d", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "be7dc55e6204d6aca355b213813ed96a", "src_uid": "78cf8bc7660dbd0602bf6e499bc6bb0d", "difficulty": 1000.0} {"lang": "PHP", "source_code": "\n", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "2b59b01a68b9228ef46fbececf99286c", "src_uid": "db9520e85b3e9186dd3a09ff8d1e8c1b", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "084a42da1135f8db6eb13ef33125e052", "src_uid": "db9520e85b3e9186dd3a09ff8d1e8c1b", "difficulty": 1000.0} {"lang": "PHP", "source_code": "getMessage()); \n\t\t }\n\t \t} \n\t \treturn self::$cont;\n\t\t}\n\t\t\n\t\tpublic static function disconnect() {\n\t\t\tself::$cont = null;\n\t\t}\n\t}\n\t$w=fgets(STDIN);\n\t$ans = ($w%2==1||$w<4)?'NO':'YES'\n\techo $ans;\n\t$pdo = Database::connect();\n\t$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t$sql = \"INSERT INTO `Prueba`(`intento`, `input`, `answer`) VALUES (null,?,?)\";\n\t$q = $pdo->prepare($sql);\n\t$q->execute(array($w,$ans);\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "ed4b31af6fc35014812b32acd4f31de0", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "difficulty": 800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "f158728bc31eb877d49c0645cef6b3ef", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "difficulty": 800.0} {"lang": "PHP", "source_code": "getMessage()); \n\t\t }\n\t \t} \n\t \treturn self::$cont;\n\t\t}\n\t\t\n\t\tpublic static function disconnect() {\n\t\t\tself::$cont = null;\n\t\t}\n\t}\n\t$w=fgets(STDIN);\n\t$ans = ($w%2==1||$w<4)?'NO':'YES';\n\techo $ans;\n\t$pdo = Database::connect();\n\t$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t$sql = \"INSERT INTO `Prueba`(`intento`, `input`, `answer`) VALUES (null,?,?)\";\n\t$q = $pdo->prepare($sql);\n\t$q->execute(array($w,$ans);\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "12e0c78e1eef8ef999a0e70777064e92", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "difficulty": 800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "5ce49a04e13ebbd6bacd6248cd4ab585", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "difficulty": 800.0} {"lang": "PHP", "source_code": "\n\n", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "47153336941f96f24e6c20a464c9b157", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "difficulty": 800.0} {"lang": "PHP", "source_code": "2 && $w%2==0) echo \"YES\";\nelse echo=\"NO\";\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "679ee08aff06e5bb51d8afe7ded46d5b", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "difficulty": 800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "38c33facb9a98bdbd291fc28954248a8", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "difficulty": 800.0} {"lang": "PHP", "source_code": "2 && $w%2==0) echo \"YES\";\nelse echo=\"NO\";\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "db760bb9b0588fa47bca289758c0be0c", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "difficulty": 800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "8c477b244d014de09f9bf2cdf7312b91", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "difficulty": 800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "eb4514995d811f6fe477a2df8ca239bf", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "difficulty": 800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "ad6a13fd53eedd46a3f9bf3210c4eb6f", "src_uid": "230a3c4d7090401e5fa3c6b9d994cdf2", "difficulty": 800.0} {"lang": "PHP", "source_code": " $ball) {\n if ($ball > 0 && $ball >= $num) {\n $count++;\n }\n}\n\necho $count;", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "c3da20898418c1eb99b4a93fb44f1ae2", "src_uid": "193ec1226ffe07522caf63e84a7d007f", "difficulty": 800.0} {"lang": "PHP", "source_code": " $k and $array[$i] > 0; $i++){\n\t$count++;\n}\necho $count;\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "4fe34d73f212820e02d0a4407f6d16c4", "src_uid": "193ec1226ffe07522caf63e84a7d007f", "difficulty": 800.0} {"lang": "PHP", "source_code": "= $score and $e>0) $c++;\n \n if ($n == 5 && $k == 5 && $a[0] == 1 && a[1] == 1 && $a[2] == 1 && $a[3] == 1 && $a[4] == 1 && $a[5] == 1)\n $c = 5;\n fprintf(STDOUT, \"%d\\n\", $c);\n}", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "faf67ee85a24a91bc4a3eeb207b4dfa2", "src_uid": "193ec1226ffe07522caf63e84a7d007f", "difficulty": 800.0} {"lang": "PHP", "source_code": " $bal) {\n\tif ($bal == 0) break;\n\tif ($result >= $k) {\n\t\tif ($data2[$key-1] == $bal) $result++;\n\t\telse break;\n\t} else {$result++;\n}\n\nfile_put_contents('php://stderr', $result);\n\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "f95122db09805268ac5b3bcfcc4545f8", "src_uid": "193ec1226ffe07522caf63e84a7d007f", "difficulty": 800.0} {"lang": "PHP", "source_code": "\n", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "f186944c121b2cee053a91d097830942", "src_uid": "193ec1226ffe07522caf63e84a7d007f", "difficulty": 800.0} {"lang": "PHP", "source_code": " $k) $total++;\n\t\telse break;\n\t}\n\techo $total;\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "988875a6cbff5c9e84c0c4903240e081", "src_uid": "193ec1226ffe07522caf63e84a7d007f", "difficulty": 800.0} {"lang": "PHP", "source_code": "0)\n\tfor($i=0;$i<(int)$a[0];$i++)\n\t\tif((int)$b[$i]>0&&(int)$b[$i]>=(int)$b[(int)$a[1] - 1)])$n++;\necho $n;", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "9d2c199a81cfd8543d8131e566390433", "src_uid": "193ec1226ffe07522caf63e84a7d007f", "difficulty": 800.0} {"lang": "PHP", "source_code": " $minimumValue){\n $result++;\n }else if ($resultOfConestantsInt[$count] = $minimumValue && $minimumValue != 0)\n $result++;\n }\n }\n}\n\n\nprintf(\"%s\\n\", $result);\n", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "1a3c7ecaf97f6a42842ad1f465b77e24", "src_uid": "193ec1226ffe07522caf63e84a7d007f", "difficulty": 800.0} {"lang": "PHP", "source_code": " $n[1]) $total++;\n\t\telse break;\n\t}\n\techo $total;\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "ab7875e1114a35b6ab68ca569df2774e", "src_uid": "193ec1226ffe07522caf63e84a7d007f", "difficulty": 800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "bdb65d46c15529bd18f7a2003c108242", "src_uid": "ffeae332696a901813677bd1033cf01e", "difficulty": 800.0} {"lang": "PHP", "source_code": " $s2){\n echo \"1\";\n}else{\n if($s1 == $s2){\n echo \"0\";\n }else{\n echo \"-1\";\n }\n}\n\n?", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "2e0587746aefcacda1c83ba11b33da49", "src_uid": "ffeae332696a901813677bd1033cf01e", "difficulty": 800.0} {"lang": "PHP", "source_code": " 7 && $len <= 100) && strpos($team, '1') !== FALSE && strpos($team, '0')!== FALSE ){\n\t\tif(!empty($team) ){\n\t\t\t$ct = 0;\n\t\t\tfor($i = 0; $i != $len; ++$i){\n\t\t\t\t$j = $i;\n\t\t\t\twhile($j != $len){\n\t\t\t\t\tif($team[$i] == $team[$j]){\n\t\t\t\t\t\t++$ct;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t++$j;\n\t\t\t\t}\n\t\t\t\tif($ct == 7){\n\t\t\t\t\techo \"YES\";\n\t\t\t\t}\n\t\t\t\t$ct = 0;\n\t\t\t}\n\t\t}\n\t}\n\techo \"NO\";\n}\n\n\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "b2863869ab5d425074195ef45927d549", "src_uid": "ed9a763362abc6ed40356731f1036b38", "difficulty": 900.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "439d442c863c4dae6d8156a638a2cbbd", "src_uid": "a349094584d3fdc6b61e39bffe96dece", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "5a701e44a4353c13e092bf2b1d90af10", "src_uid": "33b73fd9e7f19894ea08e98b790d07f1", "difficulty": 800.0} {"lang": "PHP", "source_code": "= $T ? 1 : 0);\n\t}\n\techo $ans;\n?>\n", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "21a224608a83ef71576f63687a51f52f", "src_uid": "4c978130187e8ae6ca013d3f781b064e", "difficulty": 1900.0} {"lang": "PHP", "source_code": "=$l);}echo $cnt;>\n", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "2733df3915c9ff3fb402f00eeda4daee", "src_uid": "4c978130187e8ae6ca013d3f781b064e", "difficulty": 1900.0} {"lang": "PHP", "source_code": "= $T ? 1 : 0);\n\techo $ans;\n?>\n", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "41095076302a1987db0243013ac3ea2f", "src_uid": "4c978130187e8ae6ca013d3f781b064e", "difficulty": 1900.0} {"lang": "PHP", "source_code": "tok = $tok;\n\t\t$this->token = strtok($str_line, $this->tok);\n\t}\n\n\tpublic function nextToken() {\n\t\t$thisToken = $this->token;\n\t\t$this->token = strtok($this->tok);\n\t\treturn $thisToken;\n\t} \n\t\t\n\t/*public function nextFloat() {\n\t\treturn (float)$this->nextToken();\n\t}*/\n\t\n \tpublic function nextInt() {\n\t\treturn (int)$this->nextToken();\n\t}\n}\n\n/*function array_printf(array $arr) {\n\t$message = \"\";\n\tforeach ($arr as $value) {\n\t\t$message .= \"$value\" . \" \";\n\t}\n\t$message = rtrim($message);\n\tprintf('%s', $message);\n}*/\n\nfunction backtrack($W, $B, $pre_Mouse, &$sum){\n\t//if ($B <= 1 || ($B === 2 && $W <= 1) || ($B === 3 && $W === 0) || $W === 0) return;\n\tif ($W === 0 || $B <= 1 || $B === 2 && $W === 1) return;\n\t\n\t$EPS = 1e-9\n\t$temp = (float)$pre_Mouse * ($B / ($W + $B)) * (($B - 1) / ($W + $B - 1));\n\t$Mou_W = $temp * ($W / ($W + $B - 2));\n\t$Mou_B = $temp * (($B - 2) / ($W + $B - 2));\n\t$Pri_W = ($Mou_W * (($W - 1) / ($W + $B - 3)) + $Mou_B * ($W / ($W + $B - 3)));\n\t\n\tif ($Pri_W < $EPS) return;\n\telse $sum += $Pri_W;\n\n\t//$Pri_B = ($Mou_W * (($B - 2) / ($W + $B - 3)) + $Mou_B * (($B - 3) / ($W + $B - 3));\n\tbacktrack($W - 1, ($B - 2), $Mou_W, &$sum);\n\tbacktrack($W, ($B - 3), $Mou_B, &$sum);\n}\n\nfunction solve(){\n\t$Token = new Token(rtrim(fgets(STDIN), \"\\n\"), \" \");\n\t$W = $Token->nextInt();\n\t$B = $Token->nextInt();\n\t\n\t$sum = $W / ($W + $B);\n\t//backtrack($W, $B, 1, &$sum);\n\tprintf(\"%.10f\", $sum);\n}\n\nfunction run(){\n\tsolve();\n}\n\nob_end_clean();\nrun();\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "3249392577450da78af38b1968de5570", "src_uid": "7adb8bf6879925955bf187c3d05fde8c", "difficulty": 1800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "8f45a84c76f6d5977a1ad4ae52bca01a", "src_uid": "7830aabb0663e645d54004063746e47f", "difficulty": 900.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "9dcee5197806eb828ca150dda63a9819", "src_uid": "35503a2aeb18c8c1b3eda9de2c6ce33e", "difficulty": 1600.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "e2ee6bd94c280964bc5eb9b7640b21e1", "src_uid": "faa343ad6028c5a069857a38fa19bb24", "difficulty": 1200.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "6ba70827c8ead3273a703cd8bcfc822f", "src_uid": "a1583b07a9d093e887f73cc5c29e444a", "difficulty": 800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "705302cc6505b27018b880d2c1513452", "src_uid": "76c7312733ef9d8278521cf09d3ccbc8", "difficulty": 800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "f91e002bcc663f01c8f93c0e18819c2d", "src_uid": "76c7312733ef9d8278521cf09d3ccbc8", "difficulty": 800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "fc63677aee09c8e6965607c42be48627", "src_uid": "76c7312733ef9d8278521cf09d3ccbc8", "difficulty": 800.0} {"lang": "PHP", "source_code": " $asc) {\n\t\t$asc = ord(substr($len, $x, 1));\n\t\t$count = 1;\n\t} else if (ord(substr($len, $x, 1)) = $asc) {\n\t\t$count++;\n\t}\n}\nreturn str_repeat(chr($asc), $count);\n}\n\n// End of submission file\n// Submission by chaotic_iak\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "9b89ac1beca0601176f8f3c66b1220ba", "src_uid": "9a40e9b122962a1f83b74ddee6246a40", "difficulty": 800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "1c1514f77eee392a2f9001d1133edf23", "src_uid": "f97eb4ecffb6cbc8679f0c621fd59414", "difficulty": 800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "2034fa765b05d2761161844f2b4dccc3", "src_uid": "f97eb4ecffb6cbc8679f0c621fd59414", "difficulty": 800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "0cd55716e72a4e64acacb41bf304666c", "src_uid": "f97eb4ecffb6cbc8679f0c621fd59414", "difficulty": 800.0} {"lang": "PHP", "source_code": "\n\n\n", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "779ff73e4076745349e6aa65e37961e9", "src_uid": "f97eb4ecffb6cbc8679f0c621fd59414", "difficulty": 800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "71587da286a8a0e7456b50fcb0fd982b", "src_uid": "f97eb4ecffb6cbc8679f0c621fd59414", "difficulty": 800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "074151bd07fb3dfa7bba12e4e525aabe", "src_uid": "f97eb4ecffb6cbc8679f0c621fd59414", "difficulty": 800.0} {"lang": "PHP", "source_code": "\n\n\n", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "1ac285ded6b504a097d51fd0452f91df", "src_uid": "f97eb4ecffb6cbc8679f0c621fd59414", "difficulty": 800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "f6991dae1acd2f116479b600e27004dc", "src_uid": "f97eb4ecffb6cbc8679f0c621fd59414", "difficulty": 800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "98a6523551be08aff3ee4053082e1b94", "src_uid": "f97eb4ecffb6cbc8679f0c621fd59414", "difficulty": 800.0} {"lang": "PHP", "source_code": "\n\n\n", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "d4759c682241c55137fd5aa04e94257f", "src_uid": "f97eb4ecffb6cbc8679f0c621fd59414", "difficulty": 800.0} {"lang": "PHP", "source_code": " $value) {\n if ($value == $a[$key+1]) {\n unset($a[$key+1]);\n }\n}\n\nif ($a[0] == 2) {\n foreach ($a as $key => $value) {\n if (($key != 0) and (($value % 2) == 0)) {\n unset($a[$key]);\n }\n }\n}\n\n$col = 0;\n\nfor ($i=2; $i <= $d ; $i++) { \n foreach ($a as $value) {\n $x = $i % $value;\n if ($x == 0) {\n $col++;\n break;\n }\n }\n}\n\necho $col;\n\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "bd8001c80682e6951b987c63a0a2c1b5", "src_uid": "46bfdec9bfc1e91bd2f5022f3d3c8ce7", "difficulty": 800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "1eed5f66a2084bc740906a1d172e9f27", "src_uid": "46bfdec9bfc1e91bd2f5022f3d3c8ce7", "difficulty": 800.0} {"lang": "PHP", "source_code": "';\necho '';\necho '';\necho '';\n$year = fscanf(STDIN,);\n$key = array_search($year, $arr);\n$key = $key+1;\necho $arr[$key];\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "e739d0120a9d1df2d6dc2a9c1a6b69b3", "src_uid": "d62dabfbec52675b7ed7b582ad133acd", "difficulty": 800.0} {"lang": "PHP", "source_code": "';\necho '';\necho '';\necho '';\n\nfscanf(STDIN, \"%d\",$year)\n$key = array_search($year, $arr);\n$key = $key+1;\necho $arr[$key];\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "318e911e95889129e24f5eec01a33928", "src_uid": "d62dabfbec52675b7ed7b582ad133acd", "difficulty": 800.0} {"lang": "PHP", "source_code": "1,\n\"b\"=>2,\n\"c\"=>3,\n\"d\"=>4,\n\"e\"=>5,\n\"f\"=>6,\n\"g\"=>7,\n\"h\"=>8,\n);\n$dir = fopen(\"php://stdin\", 'r');\n$datatxt = stream_get_contents($dir); */\n$datatxt =\"a8\nh1\";\n$text = explode(\"\\n\",$datatxt);\n$start_x = $char_array[substr($text[0],0,1)];\n$start_y = substr($text[0],1,1);\n$end_x = $char_array[substr($text[1],0,1)];\n$end_y = substr($text[1],1,1);\n$diff_height = abs($start_x - $end_x)+1;\n$diff_width = abs($start_y - $end_y)+1;\nif ($diff_height>$diff_width) {\n$number = ($diff_height-$diff_width) + $diff_width -1;\n$start = $diff_height-$diff_width;\n} else {\n$number = ($diff_width-$diff_height) + $diff_height -1;\n$start = $diff_width-$diff_height;\n}\necho $number;\necho \"\\n\";\nif ($start_x> $end_x){\n$direction_1 = \"L\";\n}else {\n$direction_1 = \"R\";\n}\nif($start_y>$end_y){\n$direction_2 = \"D\";\n}else {\n$direction_2 = \"U\";\n}\nfor($i=0;$i<$number;$i++){\nif ($i>=$start) {\necho $direction_1.$direction_2;\necho \"\\n\";\n} else {\necho $direction_1;\necho \"\\n\";\n}\n}\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "12279d96df3dd7bffc36d05236c2b880", "src_uid": "d25d454702b7755297a7a8e1f6f36ab9", "difficulty": 1000.0} {"lang": "PHP", "source_code": "1, 'b'=>2, 'c'=>3, 'd'=>4, 'e'=>5, 'f'=>6, 'g'=>7, 'h'=>8);\n$start[0] = $translate[$start[0]];\n$finish[0] = $translate[$finish[0]];\n\n$path = array();\n$moves = 0;\n\nfunction findShortest() {\n\tglobal $start, $finish, $path, $moves;\n\n\tif ($start[0] > $finish[0]) {\n\t\tfor($i = 0; $i < 8; $i++) {\n\t\t\t$start[0]--;\n\t\t\tif ($start[1] > $finish[1]) {\n\t\t\t\t$start[1]--;\n\t\t\t\t$path[] = 'LD';\n\t\t\t} elseif ($start[1] < $finish[1]) {\n\t\t\t\t$start[1]++;\n\t\t\t\t$path[] = 'LU';\n\t\t\t} elseif ($start[1] == $finish[1]) {\n\t\t\t\t$path[] = 'L';\n\t\t\t}\n\t\t\t$moves++;\n\n\t\t\tif ($start[0] == $finish[0] && $start[1] == $finish[1]) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t} elseif ($start[0] < $finish[0]) {\n\t\tfor($i = 0; $i < 8; $i++) {\n\t\t\t$start[0]++;\n\t\t\tif ($start[1] > $finish[1]) {\n\t\t\t\t$start[1]--;\n\t\t\t\t$path[] = 'RD';\n\t\t\t} elseif ($start[1] < $finish[1]) {\n\t\t\t\t$start[1]++;\n\t\t\t\t$path[] = 'RU';\n\t\t\t} elseif ($start[1] == $finish[1]) {\n\t\t\t\t$path[] = 'R';\n\t\t\t}\n\t\t\t$moves++;\n\n\t\t\tif ($start[0] == $finish[0] && $start[1] == $finish[1]) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor($i = 0; $i < 8; $i++) {\n\t\t\tif ($start[1] > $finish[1]) {\n\t\t\t\t$start[1]--;\n\t\t\t\t$path[] = 'D';\n\t\t\t} elseif ($start[1] < $finish[1]) {\n\t\t\t\t$start[1]++;\n\t\t\t\t$path[] = 'U';\n\t\t\t}\n\n\t\t\tif ($start[1] != $finish[1]) {\n\t\t\t\t$moves++;\n\t\t\t{ else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n}\n\nfindShortest();\n\necho $moves.\"\\n\";\nforeach ($path as $move) {\n\techo $move.\"\\n\";\n}\n?>\n", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "cac9a7f3d2deb3e1af8e2a494d3b2ec9", "src_uid": "d25d454702b7755297a7a8e1f6f36ab9", "difficulty": 1000.0} {"lang": "PHP", "source_code": "1,\n\"b\"=>2,\n\"c\"=>3,\n\"d\"=>4,\n\"e\"=>5,\n\"f\"=>6,\n\"g\"=>7,\n\"h\"=>8,\n);\n$dir = fopen(\"php://stdin\", 'r');\n$datatxt = stream_get_contents($dir);\n$text = explode(\"\\n\",$datatxt);\n$start_x = $char_array[substr($text[0],0,1)];\n$start_y = substr($text[0],1,1);\n$end_x = $char_array[substr($text[1],0,1)];\n$end_y = substr($text[1],0,2);\n$diff_height = abs($start_x - $end_x);\n$diff_width = abs($start_y - $end_y);\nif ($diff_height>$diff_width) {\n$number = ($diff_height-$diff_width) + $diff_width;\n$start = $diff_height-$diff_width;\n} else {\n$number = ($diff_width-$diff_height) + $diff_height;\n$start = $diff_width-$diff_height;\n}\necho $number;\n$direction_1\nif($start_x>$end_x){\n$direction_1 = \"L\";\n}else {\n$direction_1 = \"R\";\n}\nif($start_y>$end_y){\n$direction_2 = \"D\";\n}else {\n$direction_2 = \"U\";\n}\nfor($i=1;$i<$number;$i++){\nif ($i<$start) {\necho $direction_1.$direction_2;\n} else {\necho $direction_1;\n}\n}\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "45abe0f5786c599964e95c9f1fdedbf8", "src_uid": "d25d454702b7755297a7a8e1f6f36ab9", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "d54fcd325f8d6b55f847097db7890ffa", "src_uid": "873a12edffc57a127fdfb1c65d43bdb0", "difficulty": 800.0} {"lang": "PHP", "source_code": "0 && $t < 10)\n for($i=0;$i<$n;$i++){\n echo $t;\n }\nelse{\n echo '1';\n for($i=0;$i<$n-1;$i++){\n echo '0';\n }\n}\n\n\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "545ff55649123c46dec969391877ba91", "src_uid": "77ffc1e38c32087f98ab5b3cb11cd2ed", "difficulty": 1000.0} {"lang": "PHP", "source_code": "\n", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "39a45cf9ccc05403b4f3edd7d2baded5", "src_uid": "77ffc1e38c32087f98ab5b3cb11cd2ed", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "8a48c1b01c126600a798fa868081e4b5", "src_uid": "db0eb44d8cd8f293da407ba3adee10cf", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "6d250ee4132dddb21fd89108f00ab358", "src_uid": "db0eb44d8cd8f293da407ba3adee10cf", "difficulty": 1000.0} {"lang": "PHP", "source_code": "';\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "733e2cc3f125f489f5a21a24233fa423", "src_uid": "3153cfddae27fbd817caaf2cb7a6a4b5", "difficulty": 900.0} {"lang": "PHP", "source_code": "';\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "a955ebd9de68626ba44b8374a8493b11", "src_uid": "3153cfddae27fbd817caaf2cb7a6a4b5", "difficulty": 900.0} {"lang": "PHP", "source_code": "';\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "7ed0483e9e2d2bd21e5fa0908e41fd25", "src_uid": "3153cfddae27fbd817caaf2cb7a6a4b5", "difficulty": 900.0} {"lang": "PHP", "source_code": "1 ||$yCount>$xCount){\n echo \"illegal\";\n $gotResult = 1;\n}\n\nif(!$gotResult){\n // //horizon\n // $success1 = $board[0][0].$board[1][0].$board[2][0];\n // $success2 = $board[0][1].$board[1][1].$board[2][1];\n // $success3 = $board[0][2].$board[1][2].$board[2][2];\n\n // //vertical\n // $success4 = $board[0][0].$board[0][1].$board[0][2];\n // $success5 = $board[1][0].$board[1][1].$board[1][2];\n // $success6 = $board[2][0].$board[2][1].$board[2][2];\n\n // //diagonal\n // $success7 = $board[0][0].$board[1][1].$board[2][2];\n // $success8 = $board[0][2].$board[1][1].$board[2][0];\n\n $n =count($board[0]);\n\n $xWin = 0;\n $yWin = 0;\n //Vertical and Horizontal\n //O(n^2)???\n for($i=0;$i<$n;$i++){\n $hStr = \"\";\n $vStr = \"\";\n \n for($j=0;$j<$n;$j++){\n $hStr .= $board[$i][$j];\n $vStr .= $board[$j][$i];\n }\n if($hStr ==\"XXX\" || $vStr ==\"XXX\"){\n $xWin +=1;\n }else if($hStr ==\"000\" || $vStr ==\"000\"){\n $yWin +=1;\n }\n }\n\n //Diagonal\n //O(n^2)???\n $lDia = \"\";\n $rDia = \"\";\n for($i=0;$i<$n;$i++){\n $lDia .=$board[$i][$i];\n $rDia .=$board[$i][$n-1-$i];\n }\n if($lDia ==\"XXX\" || $rDia==\"XXX\"){\n $xWin +=1;\n }else if($lDia ==\"000\" ||$rDia ==\"000\"){\n $yWin +=1;\n }\n\n if(($xWin+$yWin)>1){\n echo \"illegal\";\n }else if($xWin>0 && $yWin>0){\n echo \"illegal\";\n }else if($xCount >$yCount){\n echo \"second\";\n }else if($xCount ==$yCount{\n echo \"first\";\n }else if($xWin==1){\n echo \"the first player won\";\n }else if($yWin==1){\n echo \"the second player won\";\n }\n}\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "5365be6d2b309b4eccbfdf7a70a19ef7", "src_uid": "892680e26369325fb00d15543a96192c", "difficulty": 1800.0} {"lang": "PHP", "source_code": "\";\n\n}", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "8f1713669b58b6cb4f7dbd1aa08c5b4a", "src_uid": "1cad9e4797ca2d80a12276b5a790ef27", "difficulty": 1000.0} {"lang": "PHP", "source_code": "\";\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "3967fe455230e46f4d8f4d75f2bed3ac", "src_uid": "1cad9e4797ca2d80a12276b5a790ef27", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "697f44d9f9dbc56f2e566d938864b368", "src_uid": "1cad9e4797ca2d80a12276b5a790ef27", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "85abf4524813ab7d56008f315d4f79d8", "src_uid": "565bbd09f79eb7bfe2f2da46647af0f2", "difficulty": 1600.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "11341166c26a478c7eddeaac475f3aff", "src_uid": "29e0fc0c5c0e136ac8e58011c91397e4", "difficulty": 800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "a532671dbf00e4b9a88690badb386aec", "src_uid": "29e0fc0c5c0e136ac8e58011c91397e4", "difficulty": 800.0} {"lang": "PHP", "source_code": "= 'A' && $in[$x] <= 'Z') $flag = false;\n\t}\n\tif ($flag) {\n\t\tucwords($in);\n\t} else echo $in;", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "ac371662187daa0d277ace8a538a009c", "src_uid": "29e0fc0c5c0e136ac8e58011c91397e4", "difficulty": 800.0} {"lang": "PHP", "source_code": "= 'A' && $in[$x] <= 'Z') {\n\t\t\t$flag = false;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif ($flag) {\n\t\techo ucwords($in);\n\t} else echo $in;", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "289069dceb036d5b7b935244a8d2c7ee", "src_uid": "29e0fc0c5c0e136ac8e58011c91397e4", "difficulty": 800.0} {"lang": "PHP", "source_code": "\ufeff 96 && ord($stdin[$i]) < 123)\n\t\t\t$stdin[$i] = chr(ord($stdin[$i])-32);\n\t}\n} else {\t\t\t\t\t\t\t\t\t\t\t// \u0432\u0441\u0435 \u0432 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0435\n\tfor ($i=0; $i", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "d435628fb8223988f9ce812d21cb61a3", "src_uid": "b432dfa66bae2b542342f0b42c0a2598", "difficulty": 800.0} {"lang": "PHP", "source_code": "\ufeff 96 && ord($stdin[$i]) < 123)\n\t\t\t$stdin[$i] = chr(ord($stdin[$i])-32);\n\t}\n} else {\t\t\t\t\t\t\t\t\t\t\t// \u0432\u0441\u0435 \u0432 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0435\n\tfor ($i=0; $i", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "0337597974413f7b58a18df5c2c46796", "src_uid": "b432dfa66bae2b542342f0b42c0a2598", "difficulty": 800.0} {"lang": "PHP", "source_code": "\ufeff';\n\nfor ($i=0; $i 96 && ord($stdin[$i]) < 123)\n\t\t\t$stdin[$i] = chr(ord($stdin[$i])-32);\n\t}\n} else {\t\t\t\t\t\t\t\t\t\t\t// \u0432\u0441\u0435 \u0432 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0438\u0435\n\tfor ($i=0; $i", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "d65453a48a0c32f2571572847fd8d043", "src_uid": "b432dfa66bae2b542342f0b42c0a2598", "difficulty": 800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "e544551dcf49ea59df7a9033d804a6ed", "src_uid": "1baf894c1c7d5aeea01129c7900d3c12", "difficulty": 900.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "9499be9786b47922d8c437ad9ce6f878", "src_uid": "1baf894c1c7d5aeea01129c7900d3c12", "difficulty": 900.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "5576d63a9d0d36578ff2c3cf789f1820", "src_uid": "1baf894c1c7d5aeea01129c7900d3c12", "difficulty": 900.0} {"lang": "PHP", "source_code": "Scan();\n\t\t$numb = $scan->Scan();\n\t\t$numArray = str_split($numb);\n\t\t\n\t\t$flag = TRUE;\n\t\tfor($i = 0 ; $i < $count ; $i++)\n\t\t{\n\t\t\tif($numArray[$i] != '4' || $numArray[$i] != '7' )\n\t\t\t{\n\t\t\t\t$flag = FALSE;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$sum1 = 0;\n\t\tfor($i = 0 ; $i < $count/2 ; $i++)\n\t\t{\n\t\t\t$sum1 += $numArray[$i];\n\t\t}\n\t\t$sum2 = 0;\n\t\tfor($i = ($count/2)+1 ; $i < $count ; $i++)\n\t\t{\n\t\t\t$sum2 += $numArray[$i];\n\t\t}\n\t\tif($sum1 == $sum2){ $flag == FALSE }\n\t\t\n\t\tif($flag){print(\"YES\");}\n\t\telse {print(\"NO\");}\n\t}\n\t\n\tob_end_clean();\n\tdo();\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "1ad6aee995d8a59e95677bccbcf0f7dc", "src_uid": "435b6d48f99d90caab828049a2c9e2a7", "difficulty": 800.0} {"lang": "PHP", "source_code": "Scan();\n\t\t$numb = $scan->Scan();\n\t\t$numArray = str_split($numb);\n\t\t\n\t\t$flag = TRUE;\n\t\tfor($i = 0 ; $i < $count ; $i++)\n\t\t{\n\t\t\tif($numArray[$i] != '4' || $numArray[$i] != '7' )\n\t\t\t{\n\t\t\t\t$flag = FALSE;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$sum1 = 0;\n\t\tfor($i = 0 ; $i < $count/2 ; $i++)\n\t\t{\n\t\t\t$sum1 += $numArray[$i];\n\t\t}\n\t\t$sum2 = 0;\n\t\tfor($i = ($count/2)+1 ; $i < $count ; $i++)\n\t\t{\n\t\t\t$sum2 += $numArray[$i];\n\t\t}\n\t\tif($sum1 != $sum2){ $flag == FALSE }\n\t\t\n\t\tif($flag){print(\"YES\");}\n\t\telse {print(\"NO\");}\n\t}\n\t\n\tob_end_clean();\n\tdo_func();\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "6300288efcd24349643f59ff43fb983f", "src_uid": "435b6d48f99d90caab828049a2c9e2a7", "difficulty": 800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "a4745393166a789588cc46c6fa3d22f9", "src_uid": "c2e3aced0bc76b6484360563355d23a7", "difficulty": 800.0} {"lang": "PHP", "source_code": "\n", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "02cf58b99d224dee231363d8c3279e7b", "src_uid": "c2e3aced0bc76b6484360563355d23a7", "difficulty": 800.0} {"lang": "PHP", "source_code": " $b) {\n\t\t\t$a -= $b;\n\t\t} else {\n\t\t\t$b -= $a;\n\t\t}\n\t}\n\treturn $a;\n}\n\nfunction bcnn($a, $b) {\n\t$d = ucln($a, $b);\n\treturn $a * $b / $d;\n}\n\nfunction bcnn2($a, $b, $c) {\n\treturn bcnn($a, bcnn($b, $c));\n}\n\nfunction tinh2($a, $b, $c) {\n\tprintf(\"%.8f %.8f \", min($a[0], $b[0], $c[0]), bcnn2($a[1], $b[1], $c[1]));\n\treturn min($a[0], $b[0], $c[0]) * bcnn2($a[1], $b[1], $c[1]);\n}\n\n$d = hb3(dt($a, $b), dt($a, $c), dt($c, $b));\n$e = tinh($a, $b, $d);\n$f = tinh($a, $c, $d);\n$g = tinh($c, $b, $d);\nprintf(\"%.8f\", tinh2($e, $f, $g));", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "4bf31c9211ae2d70709bfb5bf137a54e", "src_uid": "980f4094b3cfc647d6f74e840b1bfb62", "difficulty": 2100.0} {"lang": "PHP", "source_code": " ($b * 2)) && ($a > ($c * 2)) && ($a > ($d * 2))) || (($a <= ($b / 2)) && ($a <= ($c / 2)) && ($a <= ($d / 2))))\n{\n $e++;\n $f = \"A\";\n}\nif((($b > ($a * 2)) && ($b > ($c * 2)) && ($b > ($d * 2))) || (($b <= ($a / 2)) && ($b <= ($c / 2)) && ($b <= ($d / 2))))\n{\n $e++;\n $f = \"B\";\n}\nif((($c > ($a * 2)) && ($c > ($b * 2)) && ($c > ($d * 2))) || (($c <= ($a / 2)) && ($c <= ($b / 2)) && ($c <= ($d / 2))))\n{\n $e++;\n $f = \"C\";\n}\nif((($d > ($a * 2)) && ($d > ($b * 2)) && ($d > ($c * 2))) || (($d <= ($a / 2)) && ($d <= ($b / 2)) && ($d <= ($c / 2))))\n{\n $e++;\n $f = \"D\";\n}\nif($e == 1)\n{\n print $f;\n}\nelse\n{\n print \"C\n}\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "badb64573ccf7846a2e021d21d02e561", "src_uid": "30725e340dc07f552f0cce359af226a4", "difficulty": 1300.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "e41549169483b331ef1bbfb3d27381cd", "src_uid": "ac6971f4feea0662d82da8e0862031ad", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "07c73f3ae7329ddf03d65b1cc5c9018f", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "3e1b7693b86b8daba88e7aa900a9cee2", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "6d250b4ab9d171bb6770e9d6747748d7", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "4fe7dfdc71f3bd9722fc96642d1f94ba", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "66b1114e058dbaa269822ec68c679c41", "src_uid": "c5d19dc8f2478ee8d9cba8cc2e4cd838", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "1c5b2045fd1c5b767e5ab5bb1e4d76a8", "src_uid": "42b25b7335ec01794fbb1d4086aa9dd0", "difficulty": 900.0} {"lang": "PHP", "source_code": "10)\n\t\tprintf(\"%s%d%s\\n\",$a[0],strlen($a)-2,$a[strlen($a)-1]);\n\telse\n\t\tprintf(\"%s\\n\",$a);\n}\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "e0f18c892f4cfcc1dfe243a8aa2688bd", "src_uid": "05fac54ed2064b46338bb18f897a4411", "difficulty": 1300.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "d4d61f024eb5b3a210646ab8dead39d5", "src_uid": "05fac54ed2064b46338bb18f897a4411", "difficulty": 1300.0} {"lang": "PHP", "source_code": "in();\n\t$H = (int)$Input->in();\n\n\t$n = intval($W / 2);\n\t$m = intval($H / 2);\n\t\n/*\t\n\tfor ($i = 1; $i =< $n; $i++) {\n\t\t$p[$i] = $W - 2 * $i + 1:\n\t}\n\t\n\tfor ($j = 1; $j =< $m; $j++) {\n\t\t$q[$j] = $H - 2 * $i + 1:\n\t}\n\t\n\t$ans = 0;\n\tfor ($k = 1; $k <= min($n, $m); $k++) {\n\t\t$ana += $p[$k] * $q[$k];\n\t}\n*/\n\t$len = min($n, $m);\n\t$ans = 0;\n\t\n\tfor ($i = 1; $i =< $len; $i++) {\n\t\t$p = $W - 2 * $i + 1:\n\t\t$q = $H - 2 * $i + 1:\n\t\t$ana += $p * $q;\n\t\t//short\n\t\t//$ana += ($W - 2 * $i + 1) * ($H - 2 * $i + 1);\n\t}\n\n\tprint($ans);\n\t}\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?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "e482dd115ea38aeb5a93d74f0bd8fe02", "src_uid": "42454dcf7d073bf12030367eb094eb8c", "difficulty": 1300.0} {"lang": "PHP", "source_code": "in();\n\t$H = (int)$Input->in();\n\n\t$n = intval($W / 2);\n\t$m = intval($H / 2);\n\t$ans = 0;\n\n\tfor ($i = 1; $i =< $n; $i++) {\n\t\tfor ($k = 1; $k =< $m; $k++) {\n\t\t\t$p = $W - 2 * $i + 1;\n\t\t\t$q = $H - 2 * $k + 1;\n\t\t\t$ans += $p * $q;\n\t\t\t//short\n\t\t\t//$ana += ($W - 2 * $i + 1) * ($H - 2 * $i + 1);\n\t\t}\n\t}\n\n\tprint($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?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "c0331a8a6a7e02bb307d6b24d4924900", "src_uid": "42454dcf7d073bf12030367eb094eb8c", "difficulty": 1300.0} {"lang": "PHP", "source_code": "= 4) k++;\n\tif($a[$i] == 2) q++;\n}\nif($k && $q){\n\techo \"Elephant\";\n}else if($k)\n\techo \"Bear\";\nelse echo \"Alien\";\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "82b2de6ea7d03fff62b4d1a43504e76b", "src_uid": "43308fa25e8578fd9f25328e715d4dd6", "difficulty": 1100.0} {"lang": "PHP", "source_code": " $el){\n\t\tif ($el >= 4){\n\t\t\t$hasFoot = true;\n\t\t\tif ($el == 5) $head = $k;\n\t\t\tif ($el == 6) $body = $k; \n\t\t}else{\n\t\t\tif ($el == 2){\n\t\t\t\t$head = $body = $k;\n\t\t\t}else{\n\t\t\t\tif ($head == 0) $head = $k;\n\t\t\t\telse $body = $k;\n\t\t\t}\n\t\t\t\n\t\t}\n\t}\n\techo $hasFoot ? $body == $head ? 'Elephant' : 'Bear' : 'Alien';\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "b13591e7b1a4bd88b8c32ddf7bc1fe21", "src_uid": "43308fa25e8578fd9f25328e715d4dd6", "difficulty": 1100.0} {"lang": "PHP", "source_code": "1,'.'=>-1);\n$a = \"NO\";\nfor($i=0;$i<3;$i++)\n\tfor($j=0;$j<3;$j++)\n\t\tif(abs($m[$s[$i*4+$j]]+$m[$s[$i*4+$j+1]]+$m[$s[$i*5+$j]+$m[$s[$i*5+$j+1]])==2){\n\t\t\t$a = \"YES\";\n\t\t\tbreak 2;\n\t\t}\necho $a;\nreturn;\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "3161d08f012560fa09c7f80c2f592782", "src_uid": "01b145e798bbdf0ca2ecc383676d79f3", "difficulty": 1100.0} {"lang": "PHP", "source_code": "1,'.'=>-1);\n$a = \"NO\";\nfor($i=0;$i<3;$i++)\n\tfor($j=0;$j<3;$j++)\n\t\tif(abs($m[$s[$i*4+$j]+$m[$s[$i*4+$j+1]]+$m[$s[$i*5+$j]+$m[$s[$i*5+$j+1]])==2){\n\t\t\t$a = \"YES\";\n\t\t\tbreak 2;\n\t\t}\necho $a;\nreturn;\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "9edf167427fcd3b8ca579803938b6de5", "src_uid": "01b145e798bbdf0ca2ecc383676d79f3", "difficulty": 1100.0} {"lang": "PHP", "source_code": "1,'.'=>-1);\n$a = \"NO\";\nfor($i=0;$i<3;$i++)\n\tfor($j=0;$j<3;$j++)\n\t\tif(abs($m[$s[$i*4+$j]+$m[$s[$i*4+$j+1]]+$m[$s[$i*5+$j]+$m[$s[$i*5+$j+1]])==2){\n\t\t\t$a = \"YES\";\n\t\t\tbreak 2;\n\t\t}\necho $a;\nreturn;\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "06c38268f689b57fb4b5e40d1897df11", "src_uid": "01b145e798bbdf0ca2ecc383676d79f3", "difficulty": 1100.0} {"lang": "PHP", "source_code": "0) echo 'HARD';\n else echo 'EASY'", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "9fca366e026fa4d0af0f686b9859777d", "src_uid": "060406cd57739d929f54b4518a7ba83e", "difficulty": 800.0} {"lang": "PHP", "source_code": " $h) {\n\techo ('easy');\n}\nelse if ($h > $e) {\n\techo ('hard');\n}\nelse {\n\techo ('unknown');\n}", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "ac6ba03012b9a1e9cf8f0033c99e3870", "src_uid": "060406cd57739d929f54b4518a7ba83e", "difficulty": 800.0} {"lang": "PHP", "source_code": "\n", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "cafa5ea7850255886c6eb3442945c45d", "src_uid": "8b6ae2190413b23f47e2958a7d4e7bc0", "difficulty": 1100.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "a81df62af0e73016f5cf3eb0fbaf0f78", "src_uid": "03caf4ddf07c1783e42e9f9085cc6efd", "difficulty": 800.0} {"lang": "PHP", "source_code": "=1)&($n<=exp(5*log(10))))\n{\n\tfor($i=1; $i<=$n; $i++)\n\t{\n\t\t$s = trim(fgets($h));\n\t\t$user[$i]=$s;\n\t\t}\n\t\tfputs(STDOUT, \"Vihodnie dannie: \");\n\t\t$k[$user[1]]=0;\n\t\tfputs(STDOUT, \"OK \");\n\t\tfor ($i=2; $i<=$n; $i++)\n\t\t{\n\t\t\t$f=false;\n\t\t\tfor ($j=1; $j<=$i-1; $j++)\n\t\t\t{\n\t\t\t\tif ($user[$i]==$user[$j]) {$f=true; $k[$user[$i]]++; break;}\n\t\t\t\telse {$k[$user[$i]]=0;}\n\t\t\t\t}\n\t\t\t\tif ($f==false) \n\t\t\t\t\t{\n\t\t\t\t\t\tfputs(STDOUT, \"OK \");\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$s=$user[$i];\n\t\t\t\t\t\t\t$s.=$k[$user[$i]];\n\t\t\t\t\t\t\tfputs(STDOUT, \"$s\");\n\t\t\t\t\t\t\tfputs(STDOUT, \" \");\n\t\t\t\t\t\t\t}\n\t\t\t}\n\t}\n\telse\n\t{fputs(STDOUT, \"\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd \ufffd\ufffd\ufffd\ufffd\ufffd \ufffd\ufffd\ufffd\ufffd\ufffd\ufffd \ufffd\ufffd\ufffd\ufffd \ufffd\ufffd \ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd 1<=n<=10^5\");\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "cec1bfef4178c3ffb6317699f4da8585", "src_uid": "6a5fe5fac8a4e3993dc3423180cdd6a9", "difficulty": 800.0} {"lang": "PHP", "source_code": "0;$y--) {\n\t\t\tif ($var[$y] == 'G' && $var[$y-1] == 'B') {\n\t\t\t\t$var[$y] = 'B';\n\t\t\t\t$var[$y-1] = 'G';\n\t\t\t}\n\t\t}\n\t}\n\techo implode('',$var);", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "4bc24e14410ee69bdb601226e2555293", "src_uid": "964ed316c6e6715120039b0219cc653a", "difficulty": 800.0} {"lang": "PHP", "source_code": "0;$y--) {\n\t\t\tif ($var[$y] == 'G' && $var[$y-1] == 'B') {\n\t\t\t\t$var[$y] = 'B';\n\t\t\t\t$var[$y-1] = 'G';\n\t\t\t}\n\t\t}\n\t}\n\techo implode('',$var);", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "e81aa5daeb99d52ba94944579ea11c81", "src_uid": "964ed316c6e6715120039b0219cc653a", "difficulty": 800.0} {"lang": "PHP", "source_code": " 10^5 ) file_put_contents('php://stdout', -1);)\n\nfor ($i = 1; $i < 5; $i++) {\n $input[$i] = explode(' ', $input[$i]); \n}\n\n\nfor ($i = 1; $i < 5; $i++) {\n \n //\u0414\u0438\u043a\u043e \u0441\u0442\u044b\u0434\u043d\u043e \u0437\u0430 \u044d\u0442\u043e \u043d\u043e \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u0434\u0436\u0438\u043c\u0430\u043b\u043e.\n if ($input[$i][1] < 1 or $input[$i][1] > 10^5 ) file_put_contents('php://stdout', -1);\n if ($input[$i][2] < 1 or $input[$i][2] > 10^5 ) file_put_contents('php://stdout', -1);\n if ($input[$i][3] < 1 or $input[$i][3] > 10^5 ) file_put_contents('php://stdout', -1);\n if ($input[$i][4] < 1 or $input[$i][4] > 10^5 ) file_put_contents('php://stdout', -1);\n \n $price[$i][1] = ($input[$i][0] < $input[$i][1]) ? $input[$i][0] : $input[$i][1];\n $price[$i][2] = ($input[$i][2] < $input[$i][3]) ? $input[$i][2] : $input[$i][3];\n}\n\nfor ($i = 1; $i < 5; $i++) {\n if ($input[0] < $price[$i][1] + $price[$i][2]) {\n $output = -1;\n continue;\n }\n \n if ($price[$i][1] + $price[$i][2] < $input[0]) {\n $price[$i][2] = $price[$i][2] + ($input[0] - ($price[$i][1] + $price[$i][2]));\n }\n $output = $i . ' ' . $price[$i][1] . ' ' . $price[$i][2];\n break;\n \n \n \n}\n\nfile_put_contents('php://stdout', $output);", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "9d728ffa82c2ddb0d0ec5e51f102519a", "src_uid": "6e7ee0da980beb99ca49a5ddd04089a5", "difficulty": 1100.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "7a623a9090b14f252475103a697cc1df", "src_uid": "745f81dcb4f23254bf6602f9f389771b", "difficulty": 800.0} {"lang": "PHP", "source_code": "\".$ans[$i].\", \\n\";\n }\n}\n\nfunction GetSum(){\n global $prime;\n global $sum;\n global $p;\n $prime_len = count($prime);\n $cnt = 0;\n for($i = 0 ; $i < $prime_len ; $i++){\n if($p[$prime[$i] + $prime[$i+1] + 1]){ // \u548c\u4e5f\u8981\u662f\u7d20\u6570\n $sum[$cnt++] = $prime[$i] + $prime[$i+1] + 1;\n //echo \"sum = \".$sum[$cnt-1].\"\\n\";\n }\n }\n}\n\nfunction GetPrime(){\n global $prime; \n global $p;\n $end = 1e4;\n $p = memset($p,1 , $end);\n $p[1] = 0;\n for ($i = 2 ; $i < $end/2 ; $i ++){\n if($p[$i])\n for ($j = $i+$i ; $j < $end ; $j += $i){\n if($p[$j])\n $p[$j] = 0;\n }\n }\n $cnt = 0;\n for($i = 2 ; $i < $end ; $i++){\n if($p[$i]){\n $prime[$cnt++] = $i;\n //echo $i.\",\"; \n }\n } \n //echo \"count:\".count ($prime);\n}\n\n\n\nfunction memset($arr , $value , $length){\n for ($i = 0 ; $i < $length ; $i++){\n array_push($arr,$value);\n }\n return $arr;\n}\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "2c42c5fffe366bd7224feefd12149f64", "src_uid": "afd2b818ed3e2a931da9d682f6ad660d", "difficulty": 1000.0} {"lang": "PHP", "source_code": "1) {\n for($i=2;$i<$n;++$i) if($n%$i==0) { $n/=$i, break; }\n echo \"$n \";\n}", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "672d3ef82377ddbb5703a802c5658c46", "src_uid": "2fc946bb72f56b6d86eabfaf60f9fa63", "difficulty": 1300.0} {"lang": "PHP", "source_code": " 0 && $iL > 0) {\n $c = $iR - $iL + 1;\n } else {\n $c = $iR - $iL\n }\n \necho $c;", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "9c6e6314eb9df726b5550a2cdb0d7309", "src_uid": "098ade88ed90664da279fe8a5a54b5ba", "difficulty": 800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "917fc82630f983099eb13a41469280be", "src_uid": "689e7876048ee4eb7479e838c981f068", "difficulty": 800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "6f1a4b4b41b8d30bd7de2dd142ae4d0a", "src_uid": "031e53952e76cff8fdc0988bb0d3239c", "difficulty": 900.0} {"lang": "PHP", "source_code": " $value) {\n if($sum +$s[$key] > $k){\n break;\n }\n $sum += $s[$key];\n $res[] = $key+1; \n } \n echo count($res).\"\\n\";\n for($i = 0;$i ", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "6387af4647df5ba5e4421a0a92a432b0", "src_uid": "dbb164a8dd190e63cceba95a31690a7c", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "c85cba07078c2d30478ce0b069a163ad", "src_uid": "90b9ef939a13cf29715bc5bce26c9896", "difficulty": 1600.0} {"lang": "PHP", "source_code": " $d or $free_time % 5 != 0) {\n return -1;\n }\n\n $churu_jokes += $free_time / 5;\n\n return $churu_jokes;\n}\n\necho task([2, 2, 1], 30);", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "3bae7768de48c8c866768ebf29245545", "src_uid": "b16f5f5c4eeed2a3700506003e8ea8ea", "difficulty": 900.0} {"lang": "PHP", "source_code": " $iBlackWeight)\n\t\techo \"White\\n\";\n\telse if ($iWhiteWeight < $iBlackWeight)\n\t\techo \"Black\\n\";\n\telse if ($iWhiteWeight == $iBlackWeight)\n\t\techo \"Draw\\n\";\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "73c51a24791a4251b7008c1c7b1a9492", "src_uid": "44bed0ca7a8fb42fb72c1584d39a4442", "difficulty": 900.0} {"lang": "PHP", "source_code": " 15) {\n echo($t[$i] + 15);\n $isTVOff = true;\n break;\n }\n}\nif (!$isTVOff) {\n echo(90);\n}", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "2fa6ffd6f785d4a04f503541c9474c96", "src_uid": "5031b15e220f0ff6cc1dd3731ecdbf27", "difficulty": 800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "028183141abc92d0845c39953b2c3e8f", "src_uid": "e2357a1f54757bce77dce625772e4f18", "difficulty": 1700.0} {"lang": "PHP", "source_code": " \"1\", \"1\" => \"0\");\nstrtr($rA, $trans);\n\nif ($rA==$a)?\"OK\":\"WRONG_ANSWER\";\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "518a7e8f9eb8665fc65947bfa9be410c", "src_uid": "d1e381b72a6c09a0723cfe72c0917372", "difficulty": 1100.0} {"lang": "PHP", "source_code": " \"1\", \"1\" => \"0\");\nstrstr($q, $trans);\n\necho ($q=$a)?\"OK\":\"WRONG_ANSWER\";\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "2e2e8e5579f68669c30fb6f421467256", "src_uid": "d1e381b72a6c09a0723cfe72c0917372", "difficulty": 1100.0} {"lang": "PHP", "source_code": "0){echo'Impossible';return;}\n$min=$Parent;\nif($Childs>$Parent)$min=$Childs\n$max=$Parent;\nif($Childs>0)$max+=$Childs-1;\necho $min.' '.$max;", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "75f6408c97b6682634d0c8035f1d33ef", "src_uid": "1e865eda33afe09302bda9077d613763", "difficulty": 1100.0} {"lang": "PHP", "source_code": " $price) {\n $hooks[] = [\n 'id' => $index+1,\n 'price' => $price\n ];\n}\n\nusort($hooks, function($a, $b) {\n return ($a['price'] < $b['price']) ? -1 : 1;\n});\n\n$rubles = 0;\n$min = min($m, $n);\nfor ($i = 0; $i < $min; $i++) {\n $rubles += $hooks[$i]['price'];\n}\n\nif ($m > $n) {\n $rubles -= ($m-$n);\n}\n\necho $rubles.\"\\n\";\n\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "343c081270c40506d00c3821c5716346", "src_uid": "5c21e2dd658825580522af525142397d", "difficulty": 1000.0} {"lang": "PHP", "source_code": " $price) {\n $hooks[] = [\n 'id' => $index+1,\n 'price' => $price\n ];\n}\n\nusort($hooks, function($a, $b) {\n return ($a['price'] < $b['price']) ? -1 : 1;\n});\n\n$rubles = 0;\n$min = min($m, $n);\nfor ($i = 0; $i < $min; $i++) {\n $rubles += $hooks[$i]['price'];\n}\n\nif ($m > $n) {\n $rubles -= ($m-$n);\n}\n\necho $rubles.\"\\n\";\n\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "012a18c21c72607dc669fabc4c7c1c2f", "src_uid": "5c21e2dd658825580522af525142397d", "difficulty": 1000.0} {"lang": "PHP", "source_code": " $price) {\n $hooks[] = [\n 'id' => $index+1,\n 'price' => $price\n ];\n}\n\nusort($hooks, function($a, $b) {\n return ($a['price'] < $b['price']) ? -1 : 1;\n});\n\n$rubles = 0;\n$min = min($m, $n);\nfor ($i = 0; $i < $min; $i++) {\n $rubles += $hooks[$i]['price'];\n}\n\nif ($m > $n) {\n $rubles -= ($m-$n);\n}\n\necho $rubles.\"\\n\";\n\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "d7b4744cfb011f458c77d93443fd7ed7", "src_uid": "5c21e2dd658825580522af525142397d", "difficulty": 1000.0} {"lang": "PHP", "source_code": " $d[$i])\n\t\t\t\t{\n\t\t\t\t\t$tri = true;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t} else if (abs($d[$j] - $d[$k]) = $d[$i] || $d[$j] + $d[$k] = $d[$i])\n\t\t\t\t{\n\t\t\t\t\t$seg = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} \n\t}\n\t\n\tif ($tri) print(\"TRIANGLE\");\n\telse if ($seg) print(\"SEGMENT\");\n\telse print(\"IMPOSSIBLE\");\n}\n\n?>", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "66a117b3172590876d7ac7f258e5562d", "src_uid": "8f5df9a41e6e100aa65b9fc1d26e447a", "difficulty": 900.0} {"lang": "PHP", "source_code": " 0) ? 1 : 0;\n\t\t}\n\t\treturn $div;\n\t}\n\t\n\tmain();\n?>\n", "lang_cluster": "PHP", "compilation_error": true, "code_uid": "f697e32a901f4d6f6a427e6e60c1d8ea", "src_uid": "033068c5e16d25f09039e29c88474275", "difficulty": 1400.0} {"lang": "PHP", "source_code": "= array_sum($second)) {\n echo 'Yes';\n} else {\n echo 'No';\n}", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "665936797104ece0663ab5364cfc7d1f", "src_uid": "e0ddac5c6d3671070860dda10d50c28a", "difficulty": 800.0} {"lang": "PHP", "source_code": " $c[$x])\n {\n $e += $b[$x] - $c[$x];\n }\n}\nif($d <= $e)\n{\n print \"Yes\";\n}\nelse\n{\n print \"No\";\n}\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "9dbda485c70158c1c5e7cff6981571d6", "src_uid": "e0ddac5c6d3671070860dda10d50c28a", "difficulty": 800.0} {"lang": "PHP", "source_code": " $c[$x])\n {\n $e += $b[$x] - $c[$x];\n }\n}\nif($d < $e)\n{\n print \"Yes\";\n}\nelse\n{\n print \"No\";\n}\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "1e899eb3bbda76ac336b417b0e6daead", "src_uid": "e0ddac5c6d3671070860dda10d50c28a", "difficulty": 800.0} {"lang": "PHP", "source_code": " array_sum($second)) {\n echo 'Yes';\n} else {\n echo 'No';\n}", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "2aecbd16b71bbd3d4d733d178622c11c", "src_uid": "e0ddac5c6d3671070860dda10d50c28a", "difficulty": 800.0} {"lang": "PHP", "source_code": " $y1)\n $ans1 = $y1;\n $n -= $ans1;\n $ans2 = $n - $x3;\n if($ans2 > $y2)\n $ans2 = $y2;\n $ans3 = $n - $ans2;\n echo $ans1;\n echo \" \";\n echo $ans2;\n echo \" \";\n echo $ans3;\n?>\n", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "56f6a1e5bbc76cd3e44d53c22b0f9f5f", "src_uid": "3cd092b6507079518cf206deab21cf97", "difficulty": 1100.0} {"lang": "PHP", "source_code": "= $b) && ($h <= $c))\n{\n print $h . \" \" . $d . \" \" . $f;\n}\nelseif($h > $c)\n{\n $i = $h - $d;\n if(($i >= $d) && ($i <= $e))\n {\n print $c . \" \" . $i . \" \" . $f;\n }\n else\n {\n $j = $a - $c - $e;\n print $c . \" \" . $e . \" \" . $j;\n }\n}\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "6db8227b3de1ec418ecc03eeae1dd97e", "src_uid": "3cd092b6507079518cf206deab21cf97", "difficulty": 1100.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "c1ac5bf0b335ce732382ec410aa70cc0", "src_uid": "92a233f8d9c73d9f33e4e6116b7d0a96", "difficulty": 800.0} {"lang": "PHP", "source_code": " 0):\n# if b * (m//b) == m:\n# print('YES')\n# bb = m//b\n# print(aa, bb)\n# break\n# aa += 1\n# m -= a\n# else:\n# print('NO')\n$m = (int)trim(fgets(STDIN));\n$a = (int)trim(fgets(STDIN));\n$b = (int)trim(fgets(STDIN));\nif ($a * intdiv($m, $a) === $m) {\n echo \"YES\\n\";\n $aa = intdiv($m, $a);\n $bb = 0;\n echo $aa . ' ' . $bb . \"\\n\";\n} else {\n $aa = 0;\n $p = 0;\n while ($m > 0) {\n if ($b * intdiv($m, $b) == $m) {\n echo \"YES\\n\";\n $bb = intdiv($m, $b);\n echo $aa . ' ' . $bb . \"\\n\";\n $p = 1;\n break;\n }\n $aa += 1;\n $m -= $a;\n }\n if (!$p) {\n echo \"NO\\n\";\n }\n}", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "51fea4444f6fa060e087a2c09c1ac14f", "src_uid": "b031daf3b980e03218167f40f39e7b01", "difficulty": 1100.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "344fb3a42f3652759edb006d97da4467", "src_uid": "a8d992ab26a528f0be327c93fb499c15", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "7145b4844c936e8a033f9958849bba67", "src_uid": "986ae418ce82435badadb0bd5588f45b", "difficulty": 800.0} {"lang": "PHP", "source_code": "= max(1, $a - 1 - 100000); $x--)\n{\n $c = str_split($x);\n $d = array_sum($c);\n $e = $x + $d;\n if($a == $e)\n {\n $b[count($b)] = $x;\n }\n}\nif(count($b) == 0)\n{\n print \"0\";\n}\nelse\n{\n sort($b);\n print count($b) . \"\\n\";\n for($x = 0; $x < count($b); $x++)\n {\n print $b[$x] . \"\\n\";\n }\n}\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "727b1489d960d6af6ce4d6f3b3215d5a", "src_uid": "ae20ae2a16273a0d379932d6e973f878", "difficulty": 1200.0} {"lang": "PHP", "source_code": "= max(1, $a - 1 - 100000); $x--)\n{\n $c = str_split($x);\n $d = array_sum($c);\n $e = $x + $d;\n if($a == $e)\n {\n $b[count($b)] = $e;\n }\n}\nif(count($b) == 0)\n{\n print \"0\";\n}\nelse\n{\n print count($b) . \"\\n\";\n print implode(\" \", $b);\n}\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "9e4a8ceecccdcfbcf347a97fb02ce70b", "src_uid": "ae20ae2a16273a0d379932d6e973f878", "difficulty": 1200.0} {"lang": "PHP", "source_code": "= max(1, $a - 1 - 100000); $x--)\n{\n $c = str_split($x);\n $d = array_sum($c);\n $e = $x + $d;\n if($a == $e)\n {\n $b[count($b)] = $x;\n }\n}\nif(count($b) == 0)\n{\n print \"0\";\n}\nelse\n{\n print count($b) . \"\\n\";\n print implode(\" \", $b);\n}\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "e3b63692aa9c5bf9dac935f2655be586", "src_uid": "ae20ae2a16273a0d379932d6e973f878", "difficulty": 1200.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "7ea173def9117b73b718906663e732d0", "src_uid": "5c61b4a4728070b9de49d72831cd2329", "difficulty": 1100.0} {"lang": "PHP", "source_code": " $d)\n{\n print \">\";\n}\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "1f3308cdea4890abdac978f7dbe27672", "src_uid": "ec1e44ff41941f0e6436831b5ae543c6", "difficulty": 1100.0} {"lang": "PHP", "source_code": " log($y) * $x )\n echo '>';\n else if(log($x) * $y < log($y) * $x)\n echo '<';\n else echo '=';\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "459e18ff857678f3bb3cbe3ebc3aaf49", "src_uid": "ec1e44ff41941f0e6436831b5ae543c6", "difficulty": 1100.0} {"lang": "PHP", "source_code": " $d)\n{\n print \">\";\n}\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "353c17489a532f10acd61c0d651db870", "src_uid": "ec1e44ff41941f0e6436831b5ae543c6", "difficulty": 1100.0} {"lang": "PHP", "source_code": "list($a, $b) = explode(\":\", trim(fgets(STDIN)));\nlist($c, $d) = explode(\":\", trim(fgets(STDIN)));\n$e = (($c * 60 + $d) - ($a * 60 + $b)) / 2;\nif($e >= 60)\n{\n $f = $e % 60;\n $g = floor($e / 60);\n $h = $b + $f;\n if($h >= 60)\n {\n $i = $h % 60;\n $j = floor($h / 60);\n $a += ($g + $j);\n $b = 0;\n $b += $i;\n }\n else\n {\n $a += $g;\n $b += $f;\n }\n if(strlen($a) == 1)\n {\n $a = \"0\" . $a;\n }\n if(strlen($b) == 1)\n {\n $b = \"0\" . $b;\n }\n print $a . \":\" . $b;\n}\nelse\n{\n $b += $e;\n if($b >= 60)\n {\n $i = $b % 60;\n $j = floor($b / 60);\n $a += ($g + $j);\n $b = 0;\n $b += $i;\n }\n if(strlen($a) == 1)\n {\n $a = \"0\" . $a;\n }\n if(strlen($b) == 1)\n {\n $b = \"0\" . $b;\n }\n print $a . \":\" . $b;\n}", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "1a3e66b7da314af199f44f72fcf6ee1c", "src_uid": "f7a32a8325ce97c4c50ce3a5c282ec50", "difficulty": 1000.0} {"lang": "PHP", "source_code": "= 60)\n{\n $f = $e % 60;\n $g = floor($e / 60);\n $a += $g;\n $b += $h;\n if($a < 10)\n {\n $a = \"0\" . $a;\n }\n if($b < 10)\n {\n $b = \"0\" . $b;\n }\n print $a . \":\" . $b;\n}\nelse\n{\n $b += $e;\n if($a < 10)\n {\n $a = \"0\" . $a;\n }\n if($b < 10)\n {\n $b = \"0\" . $b;\n }\n print $a . \":\" . $b;\n}\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "a9df2bb14ebf0b8e6627da4b824a1cb2", "src_uid": "f7a32a8325ce97c4c50ce3a5c282ec50", "difficulty": 1000.0} {"lang": "PHP", "source_code": "= 60)\n{\n $f = $e % 60;\n $g = floor($e / 60);\n $h = $b + $f;\n if($h == 60)\n {\n $a += ($g + 1);\n $b = 0;\n }\n else\n {\n $a += $g;\n $b += $f;\n }\n if($a < 10)\n {\n $a = \"0\" . $a;\n }\n if($b < 10)\n {\n $b = \"0\" . $b;\n }\n print $a . \":\" . $b;\n}\nelse\n{\n $b += $e;\n if($a < 10)\n {\n $a = \"0\" . $a;\n }\n if($b < 10)\n {\n $b = \"0\" . $b;\n }\n print $a . \":\" . $b;\n}\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "659777530143369998688ca668a83dce", "src_uid": "f7a32a8325ce97c4c50ce3a5c282ec50", "difficulty": 1000.0} {"lang": "PHP", "source_code": "= 60)\n{\n $f = $e % 60;\n $g = floor($e / 60);\n $a += $g;\n $b += $f;\n if($a < 10)\n {\n $a = \"0\" . $a;\n }\n if($b < 10)\n {\n $b = \"0\" . $b;\n }\n print $a . \":\" . $b;\n}\nelse\n{\n $b += $e;\n if($a < 10)\n {\n $a = \"0\" . $a;\n }\n if($b < 10)\n {\n $b = \"0\" . $b;\n }\n print $a . \":\" . $b;\n}\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "737ef9c639dbc096262c94eb6f5e46cf", "src_uid": "f7a32a8325ce97c4c50ce3a5c282ec50", "difficulty": 1000.0} {"lang": "PHP", "source_code": "= 60)\n{\n $f = $e % 60;\n $g = floor($e / 60);\n $h = $b + $f;\n if($h == 60)\n {\n $a += ($g + 1);\n $b = 0;\n }\n else\n {\n $a += $g;\n $b += $f;\n }\n if(strlen($a) == 1)\n {\n $a = \"0\" . $a;\n }\n if(strlen($b) == 1)\n {\n $b = \"0\" . $b;\n }\n print $a . \":\" . $b;\n}\nelse\n{\n $b += $e;\n if(strlen($a) == 1)\n {\n $a = \"0\" . $a;\n }\n if(strlen($b) == 1)\n {\n $b = \"0\" . $b;\n }\n print $a . \":\" . $b;\n}\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "73a0c48d55c1966b688dd5ce501ca6c5", "src_uid": "f7a32a8325ce97c4c50ce3a5c282ec50", "difficulty": 1000.0} {"lang": "PHP", "source_code": "= 60)\n{\n $f = $e % 60;\n $g = floor($e / 60);\n $h = $b + $f;\n if($h >= 60)\n {\n $i = $h % 60;\n $j = floor($h / 60);\n $a += ($g + $j);\n $b = 0;\n $b += $i;\n }\n else\n {\n $a += $g;\n $b += $f;\n }\n if(strlen($a) == 1)\n {\n $a = \"0\" . $a;\n }\n if(strlen($b) == 1)\n {\n $b = \"0\" . $b;\n }\n print $a . \":\" . $b;\n}\nelse\n{\n $b += $e;\n if($b >= 60)\n {\n $i = $b % 60;\n $j = floor($b / 60);\n $a += ($g + $j);\n $b = 0;\n $b += $i;\n }\n if(strlen($a) == 1)\n {\n $a = \"0\" . $a;\n }\n if(strlen($b) == 1)\n {\n $b = \"0\" . $b;\n }\n print $a . \":\" . $b;\n}\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "254349ce6bd6a9f05c8cb00e79adfa30", "src_uid": "f7a32a8325ce97c4c50ce3a5c282ec50", "difficulty": 1000.0} {"lang": "PHP", "source_code": " '',\n\t\t\"\\n\" => '',\n\t);\n\treturn strtr(fgets($f), $r);\n}\n\nfunction readNumString($f) {\n\treturn trim(fgets($f));\n}\n\nfunction stringToArray($str) {\n\treturn str_split($str);\n}\n\nfunction readNum($f, $is_int = false) {\n\t$v = readNumString($f);\n\treturn $is_int ? intval($v) : floatval($v);\n}\n\nfunction readStringExplode($f, $delimiter = ' ') {\n\t$v = readNumString($f);\n\tif ($delimiter == '') {\n\t\t$return = stringToArray($v);\n\t} else {\n\t\t$return = explode($delimiter, $v);\n\t}\n\t$callf = 'trim';\n\treturn array_map($callf, $return);\n}\n\nfunction readStringExplodeNum($f, $delimiter = ' ', $is_int = false) {\n\t$v = readNumString($f);\n\tif ($delimiter == '') {\n\t\t$return = stringToArray($v);\n\t} else {\n\t\t$return = explode($delimiter, $v);\n\t}\n\t$callf = $is_int ? 'intval' : 'floatval';\n\treturn array_map($callf, $return);\n}\n\nfunction readNumArray($f) {\n\treturn readStringExplodeNum($f, ' ', true);\n}\n\nfunction readArray($f) {\n\treturn readStringExplodeNum($f, ' ');\n}\n\nfunction readTrimString($f) {\n\treturn trim(readString($f));\n}\n\n###### /IO ######\n# for($i=0;$i<$n;$i++)\n\nfunction getAnswer($is_test = false, $f = false) {\n\tif ($is_test === false) {\n\t\t$f = STDIN;\n\t}\n\t/* begin body */\n\tlist($n, $k) = readNumArray($f);\n\t$pos = readNumArray($f);\n\t$kNums = readNumArray($f);\n\tarsort($kNums);\n\n\tforeach ($pos as $index => $v) {\n\t\tif ($v == 0) {\n\t\t\t$set = array_shift($kNums);\n\t\t\t$pos[$index] = $set;\n\t\t}\n\t}\n\t$isUper = true;\n\t$lastValue = false;\n\tforeach ($pos as $index => $v) {\n\t\tif ($lastValue === false) {\n\t\t\t$lastValue = $v;\n\t\t\tcontinue;\n\t\t}\n\t\tif ($v <= $lastValue) {\n\t\t\t$isUper = false;\n\t\t\tbreak;\n\t\t}\n\t\t$lastValue = $v;\n\t}\n\tif ($isUper) {\n\t\techo 'No';\n\t} else {\n\t\techo 'Yes';\n\t}\n\n\t/* / end body */\n}\n\nif (!isset($is_test)) {\n\t$is_test = false;\n}\nif (empty($is_test)) {\n\tgetAnswer();\n}", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "b713a6d927125a9ba4fd6c12b43ee574", "src_uid": "40264e84c041fcfb4f8c0af784df102a", "difficulty": 900.0} {"lang": "PHP", "source_code": " $c[$x + 1])\n {\n $g = 1;\n break;\n }\n }\n if($g == 0)\n {\n print \"No\";\n }\n else\n {\n print \"Yes\";\n }\n}\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "e2b3d382b83ce20c0663505aed3aef5c", "src_uid": "40264e84c041fcfb4f8c0af784df102a", "difficulty": 900.0} {"lang": "PHP", "source_code": " '',\n\t\t\"\\n\" => '',\n\t);\n\treturn strtr(fgets($f), $r);\n}\n\nfunction readNumString($f) {\n\treturn trim(fgets($f));\n}\n\nfunction stringToArray($str) {\n\treturn str_split($str);\n}\n\nfunction readNum($f, $is_int = false) {\n\t$v = readNumString($f);\n\treturn $is_int ? intval($v) : floatval($v);\n}\n\nfunction readStringExplode($f, $delimiter = ' ') {\n\t$v = readNumString($f);\n\tif ($delimiter == '') {\n\t\t$return = stringToArray($v);\n\t} else {\n\t\t$return = explode($delimiter, $v);\n\t}\n\t$callf = 'trim';\n\treturn array_map($callf, $return);\n}\n\nfunction readStringExplodeNum($f, $delimiter = ' ', $is_int = false) {\n\t$v = readNumString($f);\n\tif ($delimiter == '') {\n\t\t$return = stringToArray($v);\n\t} else {\n\t\t$return = explode($delimiter, $v);\n\t}\n\t$callf = $is_int ? 'intval' : 'floatval';\n\treturn array_map($callf, $return);\n}\n\nfunction readNumArray($f) {\n\treturn readStringExplodeNum($f, ' ', true);\n}\n\nfunction readArray($f) {\n\treturn readStringExplodeNum($f, ' ');\n}\n\nfunction readTrimString($f) {\n\treturn trim(readString($f));\n}\n\n###### /IO ######\n# for($i=0;$i<$n;$i++)\n\nfunction getAnswer($is_test = false, $f = false) {\n\tif ($is_test === false) {\n\t\t$f = STDIN;\n\t}\n\t/* begin body */\n\tlist($n, $k) = readNumArray($f);\n\t$pos = readNumArray($f);\n\t$kNums = readNumArray($f);\n\tarsort($kNums);\n\n\tforeach ($pos as $index => $v) {\n\t\tif ($v == 0) {\n\t\t\t$set = array_shift($kNums);\n\t\t\t$pos[$index] = $set;\n\t\t}\n\t}\n\t$isUper = true;\n\t$lastValue = false;\n\tforeach ($pos as $index => $v) {\n\t\tif ($lastValue === false) {\n\t\t\t$lastValue = $v;\n\t\t\tcontinue;\n\t\t}\n\t\tif ($v <= $lastValue) {\n\t\t\t$isUper = false;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif ($isUper) {\n\t\techo 'No';\n\t} else {\n\t\techo 'Yes';\n\t}\n\n\t/* / end body */\n}\n\nif (!isset($is_test)) {\n\t$is_test = false;\n}\nif (empty($is_test)) {\n\tgetAnswer();\n}", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "eb6a33488dcae4c9ebcb219592fd95f2", "src_uid": "40264e84c041fcfb4f8c0af784df102a", "difficulty": 900.0} {"lang": "PHP", "source_code": " 1) {\n\t\t\treturn false;\n\t\t}\n\t\tif (!$d && $n) {\n\t\t\t$n -= $powers[$i];\n\t\t} else {\n\t\t\t$n -= $d;\n\t\t}\n\t}\n\treturn true;\n}\n\n$fp = fopen('php://stdin', 'r');\nlist($n, $m) = array_map('intval', explode(' ', fgets($fp)));\n$dn = ceil(log($n, 7));\n$dm = ceil(log($m, 7));\nif ($dn + $dm > 7) {\n\tdie('0');\n}\n\n$zeros = array_fill(0, 7, 0);\n$result = 0;\nfor($i = 0; $i < $n; ++$i) {\n\t$bits = $zeros;\n\tif (!set_bits($i, $dn, $bits)) {\n\t\tcontinue;\n\t}\n\tfor($j = 0; $j < $m; ++$j) {\n\t\t$bits2 = $bits;\n\t\tif (set_bits($j, $dm, $bits2)) {\n\t\t\t++$result;\n\t\t}\n\t\t//echo \"$i:$j \".implode(' ', $bits2).\"\\n\";\n\t}\n}\necho $result;", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "2e7d2298e7f8cef14fc8b6118c3022dc", "src_uid": "0930c75f57dd88a858ba7bb0f11f1b1c", "difficulty": 1700.0} {"lang": "PHP", "source_code": " 1) {\n\t\t\treturn false;\n\t\t}\n\t\tif (!$d && $n) {\n\t\t\t$n -= $powers[$i];\n\t\t} else {\n\t\t\t$n -= $d;\n\t\t}\n\t}\n\treturn true;\n}\n\n$fp = fopen('php://stdin', 'r');\nlist($n, $m) = array_map('intval', explode(' ', fgets($fp)));\n$dn = max(1, ceil(log($n, 7)));\n$dm = max(1, ceil(log($m, 7)));\nif ($dn + $dm > 7) {\n\tdie('0');\n}\n\n$zeros = array_fill(0, 7, 0);\n$result = 0;\nfor($i = 0; $i < $n; ++$i) {\n\t$bits = $zeros;\n\tif (!set_bits($i, $dn, $bits)) {\n\t\tcontinue;\n\t}\n\tfor($j = 0; $j < $m; ++$j) {\n\t\t$bits2 = $bits;\n\t\tif (set_bits($j, $dm, $bits2)) {\n\t\t\t++$result;\n\t\t}\n\t\t//echo \"$i:$j \".implode(' ', $bits2).\"\\n\";\n\t}\n}\necho $result;", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "154a75c1e3fd3d715f22ef06f93f78a2", "src_uid": "0930c75f57dd88a858ba7bb0f11f1b1c", "difficulty": 1700.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "f3e47e9bc718d856aea1ee25c3f59f86", "src_uid": "c9c22e03c70a94a745b451fc79e112fd", "difficulty": 1300.0} {"lang": "PHP", "source_code": "= 1; $z--)\n {\n $g = $e[$y];\n for($z2 = 0; $z2 < $x - 1; $z2++)\n {\n if($g[$z2] == $z)\n {\n $g[$z2] = $x;\n }\n }\n $g = $z . $g;\n $f[count($f)] = $g;\n }\n }\n $e = $f;\n $f = array();\n}\n$h = 10000000000;\nfor($x = 0; $x < count($e); $x++)\n{\n $i = array();\n $j = $e[$x];\n for($y = 0; $y < $a; $y++)\n {\n $k = \"\";\n for($z = 0; $z < $b; $z++)\n {\n $l = $c[$y];\n $k .= $l[$j[$z] - 1];\n }\n $i[$y] = $k;\n }\n $m = max($i) - min($i);\n $h = min($h, $m);\n}\nprint $h;\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "6b3bf27b77e748ef462a127b87d2d463", "src_uid": "08f85cd4ffbd135f0b630235209273a4", "difficulty": 1400.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "4547edd0d0a5d805249b02c2af5fae1c", "src_uid": "87e37a82be7e39e433060fd8cdb03270", "difficulty": 800.0} {"lang": "PHP", "source_code": "= 0 || $b >= 0) \n\t{\n\t\t\n\t\tif ($i % 2 == 0)\n\t\t\t$b -= $i;\n\t\telse\n\t\t\t$a -= $i;\n\t\tif ($a < 0)\n\t\t{\n\t\t\tprint \"Vladik\\n\";\n\t\t\tbreak;\n\t\t}\n\t\telse if ($b < 0)\n\t\t{\n\t\t\tprint \"Valera\\n\";\n\t\t\tbreak;\n\t\t}\n\t\t$i = $i + 1;\n\t}\n}", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "d47277622a235aac4a48a6512d649e52", "src_uid": "87e37a82be7e39e433060fd8cdb03270", "difficulty": 800.0} {"lang": "PHP", "source_code": "= $i){\n $b -= $i;\n }else{\n echo 'Vladik';\n }\n\n }else{ //$i\u03aa\ufffd\ufffd\ufffd\ufffd\n if($a >= $i){\n $a -= $i;\n }else{\n echo 'Valera';\n }\n $b += $i;\n }\n }\n}\ntest($a,$b)\n?>\n", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "97648b1fbb6facb1c39425f46a48a34d", "src_uid": "87e37a82be7e39e433060fd8cdb03270", "difficulty": 800.0} {"lang": "PHP", "source_code": " $value) {\n\t\tif ($value != 1) {\n\t\t\tif ($value > 3) $value = 3;\n\t\t\tif ($key * $value > $max) $max = $key * $value;\n\t\t}\n\t}\n\t$asum = array_sum($a);\n\treturn $asum - $max;\n}\n$in = trim(fgets(STDIN));\n$cards = explode(' ', $in);\necho process($cards);\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "90aec10ba6826b071032efd54036acb4", "src_uid": "a9c17ce5fd5f39ffd70917127ce3408a", "difficulty": 800.0} {"lang": "PHP", "source_code": " $count) {\n if ($count > 3) {\n $count = 3;\n }\n if($count >= 2) {\n $values[] = $key * $count;\n }\n}\n\nif(!empty($values)) {\n echo $allSum - max($values);\n} else {\n echo $allSum;\n}", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "ff89d33a67305cb1c0bc00d4218e7765", "src_uid": "a9c17ce5fd5f39ffd70917127ce3408a", "difficulty": 800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "9df1a8285c360809b019eb7815ad73b8", "src_uid": "a9c17ce5fd5f39ffd70917127ce3408a", "difficulty": 800.0} {"lang": "PHP", "source_code": "= 0; $i--) {\n if (($i >= 2) and ($t[$i] == $t[$i - 1]) and ($t[$i] == $t[$i - 2])) {\n $s[] = $t[$i] + $t[$i - 1] + $t[$i - 2];\n/* if ($i == 4) {\n break;\n }*/\n } else if (($i >= 1) and ($t[$i] == $t[$i - 1])) {\n $s[] = $t[$i] + $t[$i - 1];\n/* if ($i == 4) {\n break;\n }*/\n }\n}\nif (isset($s)) {\n sort($s);\n $j = count($s);\n $min -= $s[$j - 1];\n}\nprint $min . \"\\n\";\nob_flush(STDOUT);\nflush(STDOUT);\n?>\n\n\n", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "81b3c389a4d10b1f8232a2a362d470a9", "src_uid": "a9c17ce5fd5f39ffd70917127ce3408a", "difficulty": 800.0} {"lang": "PHP", "source_code": " $s - $t[$i] - $t[$j] - $t[$k])\n {\n $ans = $s - $t[$i] - $t[$j] - $t[$k];\n }\n }\n if($t[$i] == $t[$j] && $ans > $s - $t[$i] - $t[$j])\n {\n $ans = $s - $t[$i] - $t[$j];\n }\n }\n }\n print $ans;\n?>\n", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "085a31e373ca411660d0df699a4a1f60", "src_uid": "a9c17ce5fd5f39ffd70917127ce3408a", "difficulty": 800.0} {"lang": "PHP", "source_code": "= 0; $i--) {\n if (($i >= 2) and ($t[$i] == $t[$i - 1]) and ($t[$i] == $t[$i - 2])) {\n $s[] = $t[$i] + $t[$i - 1] + $t[$i - 2];\n if ($i == 4) {\n break;\n }\n } else if (($i >= 1) and ($t[$i] == $t[$i - 1])) {\n $s[] = $t[$i] + $t[$i - 1];\n if ($i == 4) {\n break;\n }\n }\n}\nif (isset($s)) {\n sort($s);\n $j = count($s);\n $min -= $s[$j - 1];\n}\nprint $min;\nob_flush();\nflush();\n?>\n\n\n", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "fac4fb4b70b013647f323b51d313d850", "src_uid": "a9c17ce5fd5f39ffd70917127ce3408a", "difficulty": 800.0} {"lang": "PHP", "source_code": " $count) {\n if ($count > 3) {\n $count = 3;\n }\n if($count >= 2) {\n $values[] = $key * $count;\n }\n}\n\nif(!empty($values)) {\n echo $allSum - max($values);\n} else {\n echo $allSum;\n}", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "256ab26f5a81dfe525b50ad2db5600ec", "src_uid": "a9c17ce5fd5f39ffd70917127ce3408a", "difficulty": 800.0} {"lang": "PHP", "source_code": "= 0; $i--) {\n if (($i >= 2) and ($t[$i] == $t[$i - 1]) and ($t[$i] == $t[$i - 2])) {\n $s[] = $t[$i] + $t[$i - 1] + $t[$i - 2];\n if ($i == 4) {\n break;\n }\n } else if (($i >= 1) and ($t[$i] == $t[$i - 1])) {\n $s[] = $t[$i] + $t[$i - 1];\n if ($i == 4) {\n break;\n }\n }\n}\nif (isset($s)) {\n sort($s);\n $j = count($s);\n $min -= $s[$j - 1];\n}\nprint $min;\n?>\n\n\n", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "4790e198318013eada9cd1adedc20eb3", "src_uid": "a9c17ce5fd5f39ffd70917127ce3408a", "difficulty": 800.0} {"lang": "PHP", "source_code": "= 0; $i--) {\n if (($i >= 2) and ($t[$i] == $t[$i - 1]) and ($t[$i] == $t[$i - 2])) {\n $s[] = $t[$i] + $t[$i - 1] + $t[$i - 2];\n if ($i == 4) {\n break;\n }\n } else if (($i >= 1) and ($t[$i] == $t[$i - 1])) {\n $s[] = $t[$i] + $t[$i - 1];\n if ($i == 4) {\n break;\n }\n }\n}\nif (isset($s)) {\n sort($s);\n $j = count($s);\n $min -= $s[$j - 1];\n}\nprint $min . \"\\n\";\nob_flush(STDOUT);\nflush(STDOUT);\n?>\n\n\n", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "6d79b2dac7802c2e2d8974ba5582a237", "src_uid": "a9c17ce5fd5f39ffd70917127ce3408a", "difficulty": 800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "68b714a63e3ef33a3ab8ae338fa90034", "src_uid": "a9c17ce5fd5f39ffd70917127ce3408a", "difficulty": 800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "84f29afe3195c90b4051ac40e112ac6a", "src_uid": "03ac8efe10de17590e1ae151a7bae1a5", "difficulty": 800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "9d5eb326e5b0f21ecb5fdd5cb0e30017", "src_uid": "ee0aaa7acf127e9f3a9edafc58f4e2d6", "difficulty": null} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "81170ca85dfb171a73b29ea8669e196c", "src_uid": "ee0aaa7acf127e9f3a9edafc58f4e2d6", "difficulty": null} {"lang": "PHP", "source_code": " 1 && (($first - 1) + $sec) === $equals + 1)\n\t{\n\t\treturn substr($input, 1) . '|';\n\t}\n\tif ($equals > 1 && (($first + 1) + $sec) === $equals - 1)\n\t{\n\t\treturn '|' . substr($input, 0, -1);\n\t}\n\tif ($sec > 1 && ($first + ($sec - 1)) === $equals + 1)\n\t{\n\t\treturn str_repeat('|', $first) . '+' . str_repeat('|', $sec - 1) . '=' . str_repeat('|', $equals + 1);\n\t}\n\treturn 'Impossible';\n}\n\nwhile ($input = fgets(STDIN))\n{\n\tfwrite(STDOUT, getResult(trim($input)));\n}\n\n\n", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "56e50b1e05a2db0099bbebbcc8485522", "src_uid": "ee0aaa7acf127e9f3a9edafc58f4e2d6", "difficulty": null} {"lang": "PHP", "source_code": " 1 && (($first - 1) + $sec) === $equals + 1)\n\t{\n\t\treturn substr($input, 1) . '|';\n\t}\n\tif ($equals > 1 && (($first + 1) + $sec) === $equals - 1)\n\t{\n\t\treturn '|' . substr($input, 0, -1);\n\t}\n\tif ($sec > 1 && ($first + ($sec + 1)) === $equals - 1)\n\t{\n\t\treturn str_repeat('|', $first) . '+' . str_repeat('|', $sec + 1) . '=' . str_repeat('|', $equals - 1);\n\t}\n\treturn 'Impossible';\n}\n\nwhile ($input = fgets(STDIN))\n{\n\tfwrite(STDOUT, getResult(trim($input)));\n}\n\n\n", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "2fe1402acb1b0fa4b49d5424ffe0174e", "src_uid": "ee0aaa7acf127e9f3a9edafc58f4e2d6", "difficulty": null} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "562b2070d83a5ff04efc9be75fbec49c", "src_uid": "ee0aaa7acf127e9f3a9edafc58f4e2d6", "difficulty": null} {"lang": "PHP", "source_code": "_fh = $fileHandler;}\n\tpublic function readInt() {$d = trim(fgets($this->_fh));return (int)$d;}\n\tpublic function readArrayOfInt($size, $indexFrom = 0) {$a = [];$ind = $indexFrom;foreach (explode(' ', fgets($this->_fh)) as $item) {$a[$ind++] = (int)$item;}return $a;}\n\tpublic function readArrayOfFloat($size, $indexFrom = 0) {$a = [];$ind = $indexFrom;foreach (explode(' ', fgets($this->_fh)) as $item) {$a[$ind++] = (float)$item;}return $a;}\n\tpublic function readArrayOfString($size, $indexFrom = 0) {$a = [];$ind = $indexFrom;foreach (explode(' ', fgets($this->_fh)) as $item) {$a[$ind++] = $item;}return $a;}\n}\n\n/* Perform action N times. Can return values in array */\nfunction ntimes($n, $func, $returnResults = false) {$a = [];for ($i=1; $i<=$n; $i++) {$result = $func();if ($returnResults) {$a[$i] = $result;}}return $a;}\n\n/* Integral. Keys preserved. By reference. */\nfunction cumsum(&$a){$sum = 0;foreach($a as $k=>$v) {$a[$k] += $sum;$sum = $a[$k];}}\n\n/* Difference. Keys preserved. By reference. */\nfunction diff(&$a){$prev = 0;foreach($a as $k=>$v) {$buf=$a[$k];$a[$k]-=$prev;$prev = $buf;}}\n\nfunction bitCount($n){$cnt = 0;for ($j=$n; $j; $j>>=1){$cnt += $j&1;}return $cnt;}\n/*****************************************/\n\n$ir = new InputReader();\n\n/* TASK */\n\nlist($n, $m) = $ir->readArrayOfInt(2);\n$fullTimes = intval($n/$m);\n$mod = $n%$m;\n\n$a = array_fill(1,$m, []);\n\nfor ($i=1; $i<=$m; $i++) {\n\tfor ($j=$i; $j<=$m; $j++) {\n\t\t$a[$i][$j] = ( $i*$i + $j*$j )%$m;\n\t\t$a[$j][$i] = $a[$i][$j];\n\t}\n}\n\n$fullCnt = 0;\nfor ($i=1; $i<=$m; $i++) {\n\tfor ($j=1; $j<=$m; $j++) {\n\t\tif ($a[$i][$j] == 0) {\n\t\t\t$fullCnt++;\n\t\t}\n\t}\n}\n\n$halfCnt = 0;\nfor ($i=1; $i<=$m; $i++) {\n\tfor ($j=1; $j<=$mod; $j++) {\n\t\tif ($a[$i][$j] == 0) {\n\t\t\t$halfCnt++;\n\t\t}\n\t}\n}\n\n$quarterCnt = 0;\nfor ($i=1; $i<=$mod; $i++) {\n\tfor ($j=1; $j<=$mod; $j++) {\n\t\tif ($a[$i][$j] == 0) {\n\t\t\t$quarterCnt++;\n\t\t}\n\t}\n}\n\n$totalCnt = bcadd(bcadd(bcmul($fullCnt, bcmul($fullTimes,$fullTimes)), bcmul(bcmul(2,$halfCnt),$fullTimes)), $quarterCnt);\n\necho $totalCnt;\n", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "17b62e183b86413d92272cfe20816d10", "src_uid": "2ec9e7cddc634d7830575e14363a4657", "difficulty": 1600.0} {"lang": "PHP", "source_code": "=0;$i--)\n print (4 * $i + 5).' '.(4 * $i + 2).' '.(4 * $i + 4).' '.(($i==0)?1:(4 * $i - 1)).(($i==0)?'':' ');\n\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "d19b9d0517e80739670c08712d7dac21", "src_uid": "db263b866e93e3a97731e11102923902", "difficulty": 2300.0} {"lang": "PHP", "source_code": "= 3) print 0; else print $n - $k + $n * 2;\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "614bee7e6dbc926340874c23d3a34cb0", "src_uid": "5a5e46042c3f18529a03cb5c868df7e8", "difficulty": 900.0} {"lang": "PHP", "source_code": "= 1; $y--)\n {\n $g -= $x;\n if(((($f * $d) + ($g * $e)) == $a) && (($f + $g) == $b))\n {\n $h = 1;\n break;\n }\n }\n if($h == 1)\n {\n break;\n }\n $g = $b;\n }\n for($x = 1; $x <= $f; $x++)\n {\n array_push($i, $d);\n }\n for($x = 1; $x <= $g; $x++)\n {\n array_push($i, $e);\n }\n for($x = 0; $x < count($i); $x++)\n {\n if($i[$x] == \"2\")\n {\n $j++;\n }\n }\n print $j;\n}\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "ee49d95a41a889144b354906b3373adf", "src_uid": "5a5e46042c3f18529a03cb5c868df7e8", "difficulty": 900.0} {"lang": "PHP", "source_code": "in();\n\t$k = (int)$Input->in();\n\n\t$a = intval($k / $n);\n\t$r = $k % $n;\n\t$ans = 0;\n\t\n\tif ($r === 0) {\n\t\tif ($a === 2) $ans = $n;\n\t} else {\n\t\tif ($a === 2) $ans = $n - $r;\n\t}\n\t\n\tprint($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?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "6eb15f5147f79961e902141e844f9849", "src_uid": "5a5e46042c3f18529a03cb5c868df7e8", "difficulty": 900.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "154b831fa63c6e8fe33160f3980e399e", "src_uid": "5a5e46042c3f18529a03cb5c868df7e8", "difficulty": 900.0} {"lang": "PHP", "source_code": " 2) && ($c < 3))\n{\n $d = ceil($c);\n $e = $d - $c;\n print $a * $e;\n}\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "786c034895991d1f330e741e2958b3c0", "src_uid": "5a5e46042c3f18529a03cb5c868df7e8", "difficulty": 900.0} {"lang": "PHP", "source_code": " 2) && ($c < 3))\n{\n $d = floor($c);\n $e = $c - $d;\n print $a * $e;\n}\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "4882520a4ba03ec59872bc954e6352d4", "src_uid": "5a5e46042c3f18529a03cb5c868df7e8", "difficulty": 900.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "9749f81106639f1ec2322810eb8a855f", "src_uid": "2860b4fb22402ea9574c2f9e403d63d8", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "6c0dc3a5889de08d75692d3e2e91fb91", "src_uid": "0a2a5927d24c70aca24fc17aa686499e", "difficulty": 1500.0} {"lang": "PHP", "source_code": " $value)\n{\n if (count($value) <= 3)\n {\n \t$str = '';\n \tforeach ($value as $k => $v)\n \t{\n $str = $str . $v;\n\n \t\tif ((int)$str % 8 == 0)\n\t\t\t{\n\t\t\t\techo \"YES\\n$str\";\n\t\t\t\texit;\n\t\t\t}\n \t}\n }\n}\n\necho 'NO';\n\n/**\n * Get all the sub arrays of a given array\n *\n * @param array $difficulties The given array\n *\n * @return array All the sub arrays\n */\nfunction subArrays($difficulties)\n{\n $len = count($difficulties);\n $list = array();\n\n for ($i = 1; $i < (1 << $len); $i++)\n {\n $subArray = array();\n\n for ($j = 0; $j < $len; $j++)\n {\n if ($i & (1 << $j))\n {\n $subArray[] = (int)$difficulties[$j];\n }\n }\n\n $list[] = $subArray;\n }\n\n return $list;\n}", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "28bcddeed6558895e7ff7a3ac4f15925", "src_uid": "0a2a5927d24c70aca24fc17aa686499e", "difficulty": 1500.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "250a0c40bf72acbda79a184b597e9d92", "src_uid": "23f2c8cac07403899199abdcfd947a5a", "difficulty": 1600.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "8eb080c1ade7d3115b10d9f99406e861", "src_uid": "23f2c8cac07403899199abdcfd947a5a", "difficulty": 1600.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "c77814b935eba0ff4020aeba28472f04", "src_uid": "23f2c8cac07403899199abdcfd947a5a", "difficulty": 1600.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "efcf10f83899ebd2a8af675b930046e9", "src_uid": "23f2c8cac07403899199abdcfd947a5a", "difficulty": 1600.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "f93ab68636d43daf2e5986b27a6c94fa", "src_uid": "6058529f0144c853e9e17ed7c661fc50", "difficulty": 900.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "49c37916df5aadaf8b0825bdcc95ec2b", "src_uid": "9d1dd9d722e5fe46823224334b3b208a", "difficulty": 1600.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "0a0dd79c15877a79ba142255d0f0bae4", "src_uid": "24b02afe8d86314ec5f75a00c72af514", "difficulty": 1000.0} {"lang": "PHP", "source_code": " $b)\n{\n $f = $a - $b;\n $g = floor($f / 2);\n $h = ceil($f / 2);\n $i = $c[$g] + $c[$h];\n}\nprint $i;\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "4ca918ed3816f76d261372a8aba63de6", "src_uid": "d3f2c6886ed104d7baba8dd7b70058da", "difficulty": 800.0} {"lang": "PHP", "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?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "a5174e4d26b8599eba97a868570fc71e", "src_uid": "d3f2c6886ed104d7baba8dd7b70058da", "difficulty": 800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "8205c22f3fa848c06e5fefe521c127be", "src_uid": "6aa83c2f6e095848bc63aba7d013aa58", "difficulty": 1200.0} {"lang": "PHP", "source_code": " $val) {\n $cont = 1;\n $temp = $val;\n while ($temp != ($key + 1)) {\n ++$cont;\n if ($cont > 100) {\n exit('-1');\n }\n $temp = $arr[$temp - 1];\n }\n if ($cont % 2 == 0) {\n $cont /= 2;\n }\n $ans = $ans * $cont / gcd($ans, $cont);\n}\necho $ans;\n?>\n", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "e81b6c79fda6282a5cfaa0a8bf7388ad", "src_uid": "149221131a978298ac56b58438df46c9", "difficulty": 1600.0} {"lang": "PHP", "source_code": " 0)\n {\n if($d >= 10)\n {\n $c--;\n $d -= 10;\n $e++;\n }\n else\n {\n break;\n }\n }\n else\n {\n break;\n }\n}\nif($c > 0)\n{\n $f = $c + $d;\n $g = floor($f / 11);\n $h = $e + $g;\n print $h;\n}\nelse\n{\n print $e;\n}\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "1322dd1249b9c4c6ff84d1d2339d3657", "src_uid": "259d01b81bef5536b969247ff2c2d776", "difficulty": 800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "0c6321769f3c91f9d183f0cd5f5c7e7b", "src_uid": "f9044a4b4c3a0c2751217d9b31cd0c72", "difficulty": 800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "fc4d61f7911f8553be6878e332c240da", "src_uid": "f9044a4b4c3a0c2751217d9b31cd0c72", "difficulty": 800.0} {"lang": "PHP", "source_code": " 0)\n {\n $d++;\n $e += $d;\n $c .= $b[$x];\n $a -= $e;\n }\n }\n if($f == 1)\n {\n break;\n }\n}\nprint $c;\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "962a192b19339a0381e8c5176ae118d9", "src_uid": "b991c064562704b6106a6ff2a297e64a", "difficulty": 1600.0} {"lang": "PHP", "source_code": " 0)\n {\n $d++;\n $e += $d;\n $c .= $b[$x];\n $a -= $e;\n }\n }\n if($f == 1)\n {\n break;\n }\n}\nprint $c;\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "3d8870bcc44fa76b5ecbc583a8d4c3f2", "src_uid": "b991c064562704b6106a6ff2a297e64a", "difficulty": 1600.0} {"lang": "PHP", "source_code": " 0)\n {\n $d++;\n $e += $d;\n $c .= $b[$x];\n $a -= $e;\n }\n }\n if($f == 1)\n {\n break;\n }\n}\nprint $c;\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "1319cec8ed3cbd9f16926b06b3385c0f", "src_uid": "b991c064562704b6106a6ff2a297e64a", "difficulty": 1600.0} {"lang": "PHP", "source_code": "= $a)\n {\n $e--;\n $d -= $e;\n break;\n }\n }\n $c[count($c)] = $e;\n $a -= $d;\n if($a == 0)\n {\n break;\n }\n }\n $f = \"\";\n for($x = 0; $x < count($c); $x++)\n {\n $g = $c[$x];\n $h = implode(array_fill(0, $c[$x], $b[$x]));\n $f .= $h;\n }\n print $f;\n}\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "1c8c063de99e9a19603f89ae2bfb0912", "src_uid": "b991c064562704b6106a6ff2a297e64a", "difficulty": 1600.0} {"lang": "PHP", "source_code": " 25)\n{\n print $c - 25;\n}\nelse\n{\n print \"0\";\n}\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "559c28af5710eae11b0b5c62a11796bf", "src_uid": "ef657588b4f2fe8b2ff5f8edc0ab8afd", "difficulty": 800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "92ca6d240d1d843c55c56ca6f89817a9", "src_uid": "c30b372a9cc0df4948dca48ef4c5d80d", "difficulty": 800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "bbea19329c261208896e9b431f642827", "src_uid": "c30b372a9cc0df4948dca48ef4c5d80d", "difficulty": 800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "bf6350745e0e2b569ac7c1373238a215", "src_uid": "c30b372a9cc0df4948dca48ef4c5d80d", "difficulty": 800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "d56d4542a468cba1d18cd01570896637", "src_uid": "c046895a90f2e1381a7c1867020453bd", "difficulty": 1100.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "c71fe164e398fe50a641a9940365e792", "src_uid": "c046895a90f2e1381a7c1867020453bd", "difficulty": 1100.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "9f976dcfaa508bef3da1f9827a42a35d", "src_uid": "881a820aa8184d9553278a0002a3b7c4", "difficulty": 1500.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "7ed3523eb75ef43554c37d96da5d878f", "src_uid": "3ff1c25a1026c90aeb14d148d7fb96ba", "difficulty": 1200.0} {"lang": "PHP", "source_code": " 0))\n {\n $b = 1;\n break;\n }\n}\nif($b == 1)\n{\n print $x . \" \" . $c;\n}\nelse\n{\n print \"NO\";\n}\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "ec04fd28abea090c8344926f77b38337", "src_uid": "3ff1c25a1026c90aeb14d148d7fb96ba", "difficulty": 1200.0} {"lang": "PHP", "source_code": " 0))\n{\n $a += 3;\n print \"1 \" . ($a - 3) / 2;\n}\nelse\n{\n print \"NO\";\n}\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "5f7ed7ca8c452b24ddd94f0b7425e12e", "src_uid": "3ff1c25a1026c90aeb14d148d7fb96ba", "difficulty": 1200.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "190b3e7d3d86fbbaaf8da23331867dfe", "src_uid": "73f0c7cfc06a9b04e4766d6aa61fc780", "difficulty": 800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "868d73bee070609291c93bfc7b21ba4b", "src_uid": "3c4b2d1c9440515bc3002eddd2b89f6f", "difficulty": 1100.0} {"lang": "PHP", "source_code": "= $a)\n {\n break;\n }\n else\n {\n $c++;\n }\n}\nprint max($b);\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "e051853f409784ca20652dc40acb1ba8", "src_uid": "339246a1be81aefe19290de0d1aead84", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "1d82edc99ea67450539b5af17641fc75", "src_uid": "236177ff30dafe68295b5d33dc501828", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "0bbb81881f6076c20b6ec6029d152130", "src_uid": "236177ff30dafe68295b5d33dc501828", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "5b0efc78cf07a54f1c9cc090f419da73", "src_uid": "236177ff30dafe68295b5d33dc501828", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "e1895b345b97d3b63932ac9adf3df9a1", "src_uid": "46f051f58d626587a5ec449c27407771", "difficulty": 1200.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "47741bf5799fd522183cf8e4528aa0f5", "src_uid": "46f051f58d626587a5ec449c27407771", "difficulty": 1200.0} {"lang": "PHP", "source_code": "= 0; $x--)\n {\n if($a[$x] == 0)\n {\n $c[count($c)] = $x;\n if(count($c) == 2)\n {\n break;\n }\n }\n }\n if(count($c) == 2)\n {\n $d += (strlen($a) - 1) - $c[0];\n $d += (strlen($a) - 2) - $c[1];\n $b[count($b)] = $d;\n }\n $e = 0;\n for($x = strlen($a) - 1; $x >= 0; $x--)\n {\n if($a[$x] == 0)\n {\n $e++;\n $f = $x;\n break;\n }\n }\n for($x = strlen($a) - 1; $x >= 0; $x--)\n {\n if($a[$x] == 5)\n {\n $e++;\n $g = $x;\n break;\n }\n }\n if($e == 2)\n {\n if($f < $g)\n {\n $h += (strlen($a) - 1) - $f;\n $h += (strlen($a) - 2) - ($g - 1);\n }\n else\n {\n $h += (strlen($a) - 1) - $f;\n $h += (strlen($a) - 2) - $g;\n if($g == 0)\n {\n $i = 0;\n for($x = 1; $x < $f; $x++)\n {\n if($a[$x] == 0)\n {\n $i++;\n }\n else\n {\n break;\n }\n }\n }\n $h += $i;\n }\n $b[count($b)] = $h;\n }\n $i2 = 0;\n for($x = strlen($a) - 1; $x >= 0; $x--)\n {\n if($a[$x] == 5)\n {\n $i2++;\n $j = $x;\n break;\n }\n }\n for($x = strlen($a) - 1; $x >= 0; $x--)\n {\n if($a[$x] == 2)\n {\n $i2++;\n $k = $x;\n break;\n }\n }\n if($i2 == 2)\n {\n for($x = 0; $x < strlen($a); $x++)\n {\n if($a[$x] == 0)\n {\n $j2++;\n }\n }\n if(strlen($a) - $j2 != 2)\n {\n for($x = 0; $x < strlen($a); $x++)\n {\n if(($a[$x] != 0) && ($x != $j) && ($x != $k))\n {\n $l = $x;\n break;\n }\n }\n if(($l < $j) && ($l < $k))\n {\n if($j < $k)\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - ($k - 1);\n }\n else\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - $k;\n }\n $b[count($b)] = $m;\n }\n elseif(($l > $j) && ($l > $k))\n {\n if($j < $k)\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - ($k - 1);\n }\n else\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - $k;\n }\n $m += $l - 2;\n $b[count($b)] = $m;\n }\n elseif(($l > $j) && ($l < $k))\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - ($k - 1);\n $m += $l - 1;\n print $m;\n }\n elseif(($l > $k) && ($l < $j))\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - $k;\n $m += $l - 1;\n }\n $b[count($b)] = $m;\n }\n }\n $i2 = 0;\n $m = 0;\n for($x = strlen($a) - 1; $x >= 0; $x--)\n {\n if($a[$x] == 5)\n {\n $i2++;\n $j = $x;\n break;\n }\n }\n for($x = strlen($a) - 1; $x >= 0; $x--)\n {\n if($a[$x] == 7)\n {\n $i2++;\n $k = $x;\n break;\n }\n }\n if($i2 == 2)\n {\n for($x = 0; $x < strlen($a); $x++)\n {\n if($a[$x] == 0)\n {\n $j2++;\n }\n }\n if(strlen($a) - $j2 != 2)\n {\n for($x = 0; $x < strlen($a); $x++)\n {\n if(($a[$x] != 0) && ($x != $j) && ($x != $k))\n {\n $l = $x;\n break;\n }\n }\n if(($l < $j) && ($l < $k))\n {\n if($j < $k)\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - ($k - 1);\n }\n else\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - $k;\n }\n $b[count($b)] = $m;\n }\n elseif(($l > $j) && ($l > $k))\n {\n if($j < $k)\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - ($k - 1);\n }\n else\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - $k;\n }\n $m += $l - 2;\n $b[count($b)] = $m;\n }\n elseif(($l > $j) && ($l < $k))\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - ($k - 1);\n $m += $l - 1;\n print $m;\n }\n elseif(($l > $k) && ($l < $j))\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - $k;\n $m += $l - 1;\n }\n $b[count($b)] = $m;\n }\n }\n if(count($b) == 0)\n {\n print \"-1\";\n }\n else\n {\n print min($b);\n }\n}\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "8a4b1a6f74968c70481611da889c459d", "src_uid": "ea1c737956f88be94107f2565ca8bbfd", "difficulty": 2100.0} {"lang": "PHP", "source_code": "= 0; $x--)\n {\n if($a[$x] == 0)\n {\n $c[count($c)] = $x;\n if(count($c) == 2)\n {\n break;\n }\n }\n }\n if(count($c) == 2)\n {\n $d += (strlen($a) - 1) - $c[0];\n $d += (strlen($a) - 2) - $c[1];\n $b[count($b)] = $d;\n }\n $e = 0;\n for($x = strlen($a) - 1; $x >= 0; $x--)\n {\n if($a[$x] == 0)\n {\n $e++;\n $f = $x;\n break;\n }\n }\n for($x = strlen($a) - 1; $x >= 0; $x--)\n {\n if($a[$x] == 5)\n {\n $e++;\n $g = $x;\n break;\n }\n }\n if($e == 2)\n {\n if($f < $g)\n {\n $h += (strlen($a) - 1) - $f;\n $h += (strlen($a) - 2) - ($g - 1);\n }\n else\n {\n $h += (strlen($a) - 1) - $f;\n $h += (strlen($a) - 2) - $g;\n if($g == 0)\n {\n $i = 0;\n for($x = 1; $x < $f; $x++)\n {\n if($a[$x] == 0)\n {\n $i++;\n }\n else\n {\n break;\n }\n }\n }\n $h += $i;\n }\n $b[count($b)] = $h;\n }\n $i2 = 0;\n for($x = strlen($a) - 1; $x >= 0; $x--)\n {\n if($a[$x] == 5)\n {\n $i2++;\n $j = $x;\n break;\n }\n }\n for($x = strlen($a) - 1; $x >= 0; $x--)\n {\n if($a[$x] == 2)\n {\n $i2++;\n $k = $x;\n break;\n }\n }\n if($i2 == 2)\n {\n for($x = 0; $x < strlen($a); $x++)\n {\n if($a[$x] == 0)\n {\n $j2++;\n }\n }\n if(strlen($a) - $j2 != 2)\n {\n for($x = 0; $x < strlen($a); $x++)\n {\n if(($a[$x] != 0) && ($x != $j) && ($x != $k))\n {\n $l = $x;\n break;\n }\n }\n if(($l < $j) && ($l < $k))\n {\n if($j < $k)\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - ($k - 1);\n }\n else\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - $k;\n }\n $b[count($b)] = $m;\n }\n elseif(($l > $j) && ($l > $k))\n {\n if($j < $k)\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - ($k - 1);\n }\n else\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - $k;\n }\n $m += $l - 2;\n $b[count($b)] = $m;\n }\n elseif(($l > $j) && ($l < $k))\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - ($k - 1);\n $m += $l - 1;\n }\n elseif(($l > $k) && ($l < $j))\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - $k;\n $m += $l - 1;\n }\n $b[count($b)] = $m;\n }\n }\n $i2 = 0;\n $m = 0;\n for($x = strlen($a) - 1; $x >= 0; $x--)\n {\n if($a[$x] == 5)\n {\n $i2++;\n $j = $x;\n break;\n }\n }\n for($x = strlen($a) - 1; $x >= 0; $x--)\n {\n if($a[$x] == 7)\n {\n $i2++;\n $k = $x;\n break;\n }\n }\n if($i2 == 2)\n {\n for($x = 0; $x < strlen($a); $x++)\n {\n if($a[$x] == 0)\n {\n $j2++;\n }\n }\n if(strlen($a) - $j2 != 2)\n {\n for($x = 0; $x < strlen($a); $x++)\n {\n if(($a[$x] != 0) && ($x != $j) && ($x != $k))\n {\n $l = $x;\n break;\n }\n }\n if(($l < $j) && ($l < $k))\n {\n if($j < $k)\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - ($k - 1);\n }\n else\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - $k;\n }\n $b[count($b)] = $m;\n }\n elseif(($l > $j) && ($l > $k))\n {\n if($j < $k)\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - ($k - 1);\n }\n else\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - $k;\n }\n $m += $l - 2;\n $b[count($b)] = $m;\n }\n elseif(($l > $j) && ($l < $k))\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - ($k - 1);\n $m += $l - 1;\n }\n elseif(($l > $k) && ($l < $j))\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - $k;\n $m += $l - 1;\n }\n $b[count($b)] = $m;\n }\n }\n if(count($b) == 0)\n {\n print \"-1\";\n }\n else\n {\n print min($b);\n }\n}\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "392caf1294c6037f49edb44a69173e15", "src_uid": "ea1c737956f88be94107f2565ca8bbfd", "difficulty": 2100.0} {"lang": "PHP", "source_code": "= 0; $x--)\n {\n if($a[$x] == 0)\n {\n $c[count($c)] = $x;\n if(count($c) == 2)\n {\n break;\n }\n }\n }\n if(count($c) == 2)\n {\n $d += (strlen($a) - 1) - $c[0];\n $d += (strlen($a) - 2) - $c[1];\n $b[count($b)] = $d;\n }\n $e = 0;\n for($x = strlen($a) - 1; $x >= 0; $x--)\n {\n if($a[$x] == 0)\n {\n $e++;\n $f = $x;\n break;\n }\n }\n for($x = strlen($a) - 1; $x >= 0; $x--)\n {\n if($a[$x] == 5)\n {\n $e++;\n $g = $x;\n break;\n }\n }\n if($e == 2)\n {\n if($f < $g)\n {\n $h += (strlen($a) - 1) - $f;\n $h += (strlen($a) - 2) - ($g - 1);\n }\n else\n {\n $h += (strlen($a) - 1) - $f;\n $h += (strlen($a) - 2) - $g;\n if($g == 0)\n {\n $i = 0;\n for($x = 1; $x < $f; $x++)\n {\n if($a[$x] == 0)\n {\n $i++;\n }\n else\n {\n break;\n }\n }\n }\n $h += $i;\n }\n $b[count($b)] = $h;\n }\n $i2 = 0;\n for($x = strlen($a) - 1; $x >= 0; $x--)\n {\n if($a[$x] == 5)\n {\n $i2++;\n $j = $x;\n break;\n }\n }\n for($x = strlen($a) - 1; $x >= 0; $x--)\n {\n if($a[$x] == 2)\n {\n $i2++;\n $k = $x;\n break;\n }\n }\n if($i2 == 2)\n {\n for($x = 0; $x < strlen($a); $x++)\n {\n if($a[$x] == 0)\n {\n $j2++;\n }\n }\n if(strlen($a) == 2)\n {\n $b[count($b)] = 1;\n }\n elseif(strlen($a) - $j2 != 2)\n {\n for($x = 0; $x < strlen($a); $x++)\n {\n if(($a[$x] != 0) && ($x != $j) && ($x != $k))\n {\n $l = $x;\n break;\n }\n }\n if(($l < $j) && ($l < $k))\n {\n if($j < $k)\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - ($k - 1);\n }\n else\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - $k;\n }\n $b[count($b)] = $m;\n }\n elseif(($l > $j) && ($l > $k))\n {\n if($j < $k)\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - ($k - 1);\n }\n else\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - $k;\n }\n $m += $l - 2;\n $b[count($b)] = $m;\n }\n elseif(($l > $j) && ($l < $k))\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - ($k - 1);\n $m += $l - 1;\n }\n elseif(($l > $k) && ($l < $j))\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - $k;\n $m += $l - 1;\n }\n $b[count($b)] = $m;\n }\n }\n $i2 = 0;\n $m = 0;\n for($x = strlen($a) - 1; $x >= 0; $x--)\n {\n if($a[$x] == 5)\n {\n $i2++;\n $j = $x;\n break;\n }\n }\n for($x = strlen($a) - 1; $x >= 0; $x--)\n {\n if($a[$x] == 7)\n {\n $i2++;\n $k = $x;\n break;\n }\n }\n if($i2 == 2)\n {\n for($x = 0; $x < strlen($a); $x++)\n {\n if($a[$x] == 0)\n {\n $j2++;\n }\n }\n if(strlen($a) == 2)\n {\n $b[count($b)] = 1;\n }\n elseif(strlen($a) - $j2 != 2)\n {\n for($x = 0; $x < strlen($a); $x++)\n {\n if(($a[$x] != 0) && ($x != $j) && ($x != $k))\n {\n $l = $x;\n break;\n }\n }\n if(($l < $j) && ($l < $k))\n {\n if($j < $k)\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - ($k - 1);\n }\n else\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - $k;\n }\n $b[count($b)] = $m;\n }\n elseif(($l > $j) && ($l > $k))\n {\n if($j < $k)\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - ($k - 1);\n }\n else\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - $k;\n }\n $m += $l - 2;\n $b[count($b)] = $m;\n }\n elseif(($l > $j) && ($l < $k))\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - ($k - 1);\n $m += $l - 1;\n }\n elseif(($l > $k) && ($l < $j))\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - $k;\n $m += $l - 1;\n }\n $b[count($b)] = $m;\n }\n }\n if(count($b) == 0)\n {\n print \"-1\";\n }\n else\n {\n print min($b);\n }\n}\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "accdf563831f7ea4a2b10d1c725768b8", "src_uid": "ea1c737956f88be94107f2565ca8bbfd", "difficulty": 2100.0} {"lang": "PHP", "source_code": "= 0; $x--)\n {\n if($a[$x] == 0)\n {\n $c[count($c)] = $x;\n if(count($c) == 2)\n {\n break;\n }\n }\n }\n if(count($c) == 2)\n {\n $d += (strlen($a) - 1) - $c[0];\n $d += (strlen($a) - 2) - $c[1];\n $b[count($b)] = $d;\n }\n $e = 0;\n for($x = strlen($a) - 1; $x >= 0; $x--)\n {\n if($a[$x] == 0)\n {\n $e++;\n $f = $x;\n break;\n }\n }\n for($x = strlen($a) - 1; $x >= 0; $x--)\n {\n if($a[$x] == 5)\n {\n $e++;\n $g = $x;\n break;\n }\n }\n if($e == 2)\n {\n if($f < $g)\n {\n $h += (strlen($a) - 1) - $f;\n $h += (strlen($a) - 2) - ($g - 1);\n }\n else\n {\n $h += (strlen($a) - 1) - $f;\n $h += (strlen($a) - 2) - $g;\n if($g == 0)\n {\n $i = 0;\n for($x = 1; $x < $f; $x++)\n {\n if($a[$x] == 0)\n {\n $i++;\n }\n else\n {\n break;\n }\n }\n }\n $h += $i;\n }\n $b[count($b)] = $h;\n }\n $i2 = 0;\n for($x = strlen($a) - 1; $x >= 0; $x--)\n {\n if($a[$x] == 5)\n {\n $i2++;\n $j = $x;\n break;\n }\n }\n for($x = strlen($a) - 1; $x >= 0; $x--)\n {\n if($a[$x] == 2)\n {\n $i2++;\n $k = $x;\n break;\n }\n }\n if($i2 == 2)\n {\n for($x = 0; $x < strlen($a); $x++)\n {\n if($a[$x] == 0)\n {\n $j2++;\n }\n }\n if(strlen($a) == 2)\n {\n $b[count($b)] = 1;\n }\n elseif(strlen($a) - $j2 != 2)\n {\n for($x = 0; $x < strlen($a); $x++)\n {\n if(($a[$x] != 0) && ($x != $j) && ($x != $k))\n {\n $l = $x;\n break;\n }\n }\n if(($l < $j) && ($l < $k))\n {\n if($j < $k)\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - ($k - 1);\n }\n else\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - $k;\n }\n $b[count($b)] = $m;\n }\n elseif(($l > $j) && ($l > $k))\n {\n if($j < $k)\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - ($k - 1);\n }\n else\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - $k;\n }\n $m += $l - 2;\n $b[count($b)] = $m;\n }\n elseif(($l > $j) && ($l < $k))\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - ($k - 1);\n $m += $l - 1;\n }\n elseif(($l > $k) && ($l < $j))\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - $k;\n $m += $l - 1;\n }\n $b[count($b)] = $m;\n }\n }\n $i2 = 0;\n $m = 0;\n for($x = strlen($a) - 1; $x >= 0; $x--)\n {\n if($a[$x] == 5)\n {\n $i2++;\n $j = $x;\n break;\n }\n }\n for($x = strlen($a) - 1; $x >= 0; $x--)\n {\n if($a[$x] == 7)\n {\n $i2++;\n $k = $x;\n break;\n }\n }\n if($i2 == 2)\n {\n $j2 = 0;\n for($x = 0; $x < strlen($a); $x++)\n {\n if($a[$x] == 0)\n {\n $j2++;\n }\n }\n if(strlen($a) == 2)\n {\n $b[count($b)] = 1;\n }\n elseif(strlen($a) - $j2 != 2)\n {\n for($x = 0; $x < strlen($a); $x++)\n {\n if(($a[$x] != 0) && ($x != $j) && ($x != $k))\n {\n $l = $x;\n break;\n }\n }\n if(($l < $j) && ($l < $k))\n {\n if($j < $k)\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - ($k - 1);\n }\n else\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - $k;\n }\n $b[count($b)] = $m;\n }\n elseif(($l > $j) && ($l > $k))\n {\n if($j < $k)\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - ($k - 1);\n }\n else\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - $k;\n }\n $m += $l - 2;\n $b[count($b)] = $m;\n }\n elseif(($l > $j) && ($l < $k))\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - ($k - 1);\n $m += $l - 1;\n }\n elseif(($l > $k) && ($l < $j))\n {\n $m += (strlen($a) - 1) - $j;\n $m += (strlen($a) - 2) - $k;\n $m += $l - 1;\n }\n $b[count($b)] = $m;\n }\n }\n if(count($b) == 0)\n {\n print \"-1\";\n }\n else\n {\n print min($b);\n }\n}\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "0884e7840b9d270aec7134c66e68a02b", "src_uid": "ea1c737956f88be94107f2565ca8bbfd", "difficulty": 2100.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "844e04acf2682d41e20d8a432f2f68c1", "src_uid": "073023c6b72ce923df2afd6130719cfc", "difficulty": 1200.0} {"lang": "PHP", "source_code": " $d)\n{\n print \"TEAM 1 WINS\";\n}\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "1a452bd923b04b217e902473ea254aac", "src_uid": "bdf2e78c47d078b4ba61741b6fbb23cf", "difficulty": 1700.0} {"lang": "PHP", "source_code": "1,\n'[8'=>-1,\n'[('=>1,\n'(['=>-1,\n'(8'=>1,\n'8('=>-1,\n);\nfor($i = 0; $i < strlen($s1); $i+=2){\n if($s1{$i} == $s2{$i}) continue;\n $a += $b[$s1{$i} . $s2{$i}];\n //echo $a.\"\\n\";\n}\nif($a > 0)\nfputs(STDOUT,'TEAM 1 WINS');\nelseif($a < 0)\nfputs(STDOUT,'TEAM 2 WINS');\nelse\nfputs(STDOUT,'TIE');\n", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "1026cb94d422fdea2da3ac8465cb11c0", "src_uid": "bdf2e78c47d078b4ba61741b6fbb23cf", "difficulty": 1700.0} {"lang": "PHP", "source_code": "= $d)\n {\n $l += 1;\n }\n }\n }\n}\nfor($m = 2; $m <= 10; $m++)\n{\n for($n = 0; $n < $a - 1; $n++)\n {\n for($o = 0; $o <= $b - $m; $o++)\n {\n $p = $e[$n];\n $p2 = $e[$n + 1];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n if($r + $r2 >= $d)\n {\n $l += 1;\n }\n }\n }\n}\nfor($m = 3; $m <= 10; $m++)\n{\n for($n = 0; $n < $a - 2; $n++)\n {\n for($o = 0; $o <= $b - $m; $o++)\n {\n $p = $e[$n];\n $p2 = $e[$n + 1];\n $p3 = $e[$n + 2];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n if($r + $r2 + $r3 >= $d)\n {\n $l += 1;\n }\n }\n }\n}\nfor($m = 4; $m <= 10; $m++)\n{\n for($n = 0; $n < $a - 3; $n++)\n {\n for($o = 0; $o <= $b - $m; $o++)\n {\n $p = $e[$n];\n $p2 = $e[$n + 1];\n $p3 = $e[$n + 2];\n $p4 = $e[$n + 3];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n $r4 = array_sum(array_slice($p4, $o, $m));\n if($r + $r2 + $r3 + $r4 >= $d)\n {\n $l += 1;\n }\n }\n }\n}\nfor($m = 5; $m <= 10; $m++)\n{\n for($n = 0; $n < $a - 4; $n++)\n {\n for($o = 0; $o <= $b - $m; $o++)\n {\n $p = $e[$n];\n $p2 = $e[$n + 1];\n $p3 = $e[$n + 2];\n $p4 = $e[$n + 3];\n $p5 = $e[$n + 4];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n $r4 = array_sum(array_slice($p4, $o, $m));\n $r5 = array_sum(array_slice($p5, $o, $m));\n if($r + $r2 + $r3 + $r4 + $r5 >= $d)\n {\n $l += 1;\n }\n }\n }\n}\nfor($m = 6; $m <= 10; $m++)\n{\n for($n = 0; $n < $a - 5; $n++)\n {\n for($o = 0; $o <= $b - $m; $o++)\n {\n $p = $e[$n];\n $p2 = $e[$n + 1];\n $p3 = $e[$n + 2];\n $p4 = $e[$n + 3];\n $p5 = $e[$n + 4];\n $p6 = $e[$n + 5];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n $r4 = array_sum(array_slice($p4, $o, $m));\n $r5 = array_sum(array_slice($p5, $o, $m));\n $r6 = array_sum(array_slice($p6, $o, $m));\n if($r + $r2 + $r3 + $r4 + $r5 + $r6 >= $d)\n {\n $l += 1;\n }\n }\n }\n}\nfor($m = 7; $m <= 10; $m++)\n{\n for($n = 0; $n < $a - 6; $n++)\n {\n for($o = 0; $o <= $b - $m; $o++)\n {\n $p = $e[$n];\n $p2 = $e[$n + 1];\n $p3 = $e[$n + 2];\n $p4 = $e[$n + 3];\n $p5 = $e[$n + 4];\n $p6 = $e[$n + 5];\n $p7 = $e[$n + 6];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n $r4 = array_sum(array_slice($p4, $o, $m));\n $r5 = array_sum(array_slice($p5, $o, $m));\n $r6 = array_sum(array_slice($p6, $o, $m));\n $r7 = array_sum(array_slice($p7, $o, $m));\n if($r + $r2 + $r3 + $r4 + $r5 + $r6 + $r7 >= $d)\n {\n $l += 1;\n }\n }\n }\n}\nfor($m = 8; $m <= 10; $m++)\n{\n for($n = 0; $n < $a - 7; $n++)\n {\n for($o = 0; $o <= $b - $m; $o++)\n {\n $p = $e[$n];\n $p2 = $e[$n + 1];\n $p3 = $e[$n + 2];\n $p4 = $e[$n + 3];\n $p5 = $e[$n + 4];\n $p6 = $e[$n + 5];\n $p7 = $e[$n + 6];\n $p8 = $e[$n + 7];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n $r4 = array_sum(array_slice($p4, $o, $m));\n $r5 = array_sum(array_slice($p5, $o, $m));\n $r6 = array_sum(array_slice($p6, $o, $m));\n $r7 = array_sum(array_slice($p7, $o, $m));\n $r8 = array_sum(array_slice($p8, $o, $m));\n if($r + $r2 + $r3 + $r4 + $r5 + $r6 + $r7 + $r8 >= $d)\n {\n $l += 1;\n }\n }\n }\n}\nfor($m = 9; $m <= 10; $m++)\n{\n for($n = 0; $n < $a - 8; $n++)\n {\n for($o = 0; $o <= $b - $m; $o++)\n {\n $p = $e[$n];\n $p2 = $e[$n + 1];\n $p3 = $e[$n + 2];\n $p4 = $e[$n + 3];\n $p5 = $e[$n + 4];\n $p6 = $e[$n + 5];\n $p7 = $e[$n + 6];\n $p8 = $e[$n + 7];\n $p9 = $e[$n + 8];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n $r4 = array_sum(array_slice($p4, $o, $m));\n $r5 = array_sum(array_slice($p5, $o, $m));\n $r6 = array_sum(array_slice($p6, $o, $m));\n $r7 = array_sum(array_slice($p7, $o, $m));\n $r8 = array_sum(array_slice($p8, $o, $m));\n $r9 = array_sum(array_slice($p9, $o, $m));\n if($r + $r2 + $r3 + $r4 + $r5 + $r6 + $r7 + $r8 + $r9 >= $d)\n {\n $l += 1;\n }\n }\n }\n}\nfor($m = 10; $m <= 10; $m++)\n{\n for($n = 0; $n < $a - 9; $n++)\n {\n for($o = 0; $o <= $b - $m; $o++)\n {\n $p = $e[$n];\n $p2 = $e[$n + 1];\n $p3 = $e[$n + 2];\n $p4 = $e[$n + 3];\n $p5 = $e[$n + 4];\n $p6 = $e[$n + 5];\n $p7 = $e[$n + 6];\n $p8 = $e[$n + 7];\n $p9 = $e[$n + 8];\n $p10 = $e[$n + 9];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n $r4 = array_sum(array_slice($p4, $o, $m));\n $r5 = array_sum(array_slice($p5, $o, $m));\n $r6 = array_sum(array_slice($p6, $o, $m));\n $r7 = array_sum(array_slice($p7, $o, $m));\n $r8 = array_sum(array_slice($p8, $o, $m));\n $r9 = array_sum(array_slice($p9, $o, $m));\n $r10 = array_sum(array_slice($p10, $o, $m));\n if($r + $r2 + $r3 + $r4 + $r5 + $r6 + $r7 + $r8 + $r9 + $r10 >= $d)\n {\n $l += 1;\n }\n }\n }\n}\nfor($m = 1; $m <= 10; $m++)\n{\n for($n = 0; $n < $b; $n++)\n {\n for($o = 0; $o <= $a - $m; $o++)\n {\n $p = $i[$n];\n $r = array_sum(array_slice($p, $o, $m));\n if($r >= $d)\n {\n $l += 1;\n }\n }\n }\n}\nfor($m = 2; $m <= 10; $m++)\n{\n for($n = 0; $n < $b - 1; $n++)\n {\n for($o = 0; $o <= $a - $m; $o++)\n {\n $p = $i[$n];\n $p2 = $i[$n + 1];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n if($r + $r2 >= $d)\n {\n $l += 1;\n }\n }\n }\n}\nfor($m = 3; $m <= 10; $m++)\n{\n for($n = 0; $n < $b - 2; $n++)\n {\n for($o = 0; $o <= $a - $m; $o++)\n {\n $p = $i[$n];\n $p2 = $i[$n + 1];\n $p3 = $i[$n + 2];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n if($r + $r2 + $r3 >= $d)\n {\n $l += 1;\n }\n }\n }\n}\nfor($m = 4; $m <= 10; $m++)\n{\n for($n = 0; $n < $b - 3; $n++)\n {\n for($o = 0; $o <= $a - $m; $o++)\n {\n $p = $i[$n];\n $p2 = $i[$n + 1];\n $p3 = $i[$n + 2];\n $p4 = $i[$n + 3];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n $r4 = array_sum(array_slice($p4, $o, $m));\n if($r + $r2 + $r3 + $r4 >= $d)\n {\n $l += 1;\n }\n }\n }\n}\nfor($m = 5; $m <= 10; $m++)\n{\n for($n = 0; $n < $b - 4; $n++)\n {\n for($o = 0; $o <= $a - $m; $o++)\n {\n $p = $i[$n];\n $p2 = $i[$n + 1];\n $p3 = $i[$n + 2];\n $p4 = $i[$n + 3];\n $p5 = $i[$n + 4];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n $r4 = array_sum(array_slice($p4, $o, $m));\n $r5 = array_sum(array_slice($p5, $o, $m));\n if($r + $r2 + $r3 + $r4 + $r5 >= $d)\n {\n $l += 1;\n }\n }\n }\n}\nfor($m = 6; $m <= 10; $m++)\n{\n for($n = 0; $n < $b - 5; $n++)\n {\n for($o = 0; $o <= $a - $m; $o++)\n {\n $p = $i[$n];\n $p2 = $i[$n + 1];\n $p3 = $i[$n + 2];\n $p4 = $i[$n + 3];\n $p5 = $i[$n + 4];\n $p6 = $i[$n + 5];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n $r4 = array_sum(array_slice($p4, $o, $m));\n $r5 = array_sum(array_slice($p5, $o, $m));\n $r6 = array_sum(array_slice($p6, $o, $m));\n if($r + $r2 + $r3 + $r4 + $r5 + $r6 >= $d)\n {\n $l += 1;\n }\n }\n }\n}\nfor($m = 7; $m <= 10; $m++)\n{\n for($n = 0; $n < $b - 6; $n++)\n {\n for($o = 0; $o <= $a - $m; $o++)\n {\n $p = $i[$n];\n $p2 = $i[$n + 1];\n $p3 = $i[$n + 2];\n $p4 = $i[$n + 3];\n $p5 = $i[$n + 4];\n $p6 = $i[$n + 5];\n $p7 = $i[$n + 6];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n $r4 = array_sum(array_slice($p4, $o, $m));\n $r5 = array_sum(array_slice($p5, $o, $m));\n $r6 = array_sum(array_slice($p6, $o, $m));\n $r7 = array_sum(array_slice($p7, $o, $m));\n if($r + $r2 + $r3 + $r4 + $r5 + $r6 + $r7 >= $d)\n {\n $l += 1;\n }\n }\n }\n}\nfor($m = 8; $m <= 10; $m++)\n{\n for($n = 0; $n < $b - 7; $n++)\n {\n for($o = 0; $o <= $a - $m; $o++)\n {\n $p = $i[$n];\n $p2 = $i[$n + 1];\n $p3 = $i[$n + 2];\n $p4 = $i[$n + 3];\n $p5 = $i[$n + 4];\n $p6 = $i[$n + 5];\n $p7 = $i[$n + 6];\n $p8 = $i[$n + 7];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n $r4 = array_sum(array_slice($p4, $o, $m));\n $r5 = array_sum(array_slice($p5, $o, $m));\n $r6 = array_sum(array_slice($p6, $o, $m));\n $r7 = array_sum(array_slice($p7, $o, $m));\n $r8 = array_sum(array_slice($p8, $o, $m));\n if($r + $r2 + $r3 + $r4 + $r5 + $r6 + $r7 + $r8 >= $d)\n {\n $l += 1;\n }\n }\n }\n}\nfor($m = 9; $m <= 10; $m++)\n{\n for($n = 0; $n < $b - 8; $n++)\n {\n for($o = 0; $o <= $a - $m; $o++)\n {\n $p = $i[$n];\n $p2 = $i[$n + 1];\n $p3 = $i[$n + 2];\n $p4 = $i[$n + 3];\n $p5 = $i[$n + 4];\n $p6 = $i[$n + 5];\n $p7 = $i[$n + 6];\n $p8 = $i[$n + 7];\n $p9 = $i[$n + 8];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n $r4 = array_sum(array_slice($p4, $o, $m));\n $r5 = array_sum(array_slice($p5, $o, $m));\n $r6 = array_sum(array_slice($p6, $o, $m));\n $r7 = array_sum(array_slice($p7, $o, $m));\n $r8 = array_sum(array_slice($p8, $o, $m));\n $r9 = array_sum(array_slice($p9, $o, $m));\n if($r + $r2 + $r3 + $r4 + $r5 + $r6 + $r7 + $r8 + $r9 >= $d)\n {\n $l += 1;\n }\n }\n }\n}\nfor($m = 10; $m <= 10; $m++)\n{\n for($n = 0; $n < $b - 9; $n++)\n {\n for($o = 0; $o <= $a - $m; $o++)\n {\n $p = $i[$n];\n $p2 = $i[$n + 1];\n $p3 = $i[$n + 2];\n $p4 = $i[$n + 3];\n $p5 = $i[$n + 4];\n $p6 = $i[$n + 5];\n $p7 = $i[$n + 6];\n $p8 = $i[$n + 7];\n $p9 = $i[$n + 8];\n $p10 = $i[$n + 9];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n $r4 = array_sum(array_slice($p4, $o, $m));\n $r5 = array_sum(array_slice($p5, $o, $m));\n $r6 = array_sum(array_slice($p6, $o, $m));\n $r7 = array_sum(array_slice($p7, $o, $m));\n $r8 = array_sum(array_slice($p8, $o, $m));\n $r9 = array_sum(array_slice($p9, $o, $m));\n $r10 = array_sum(array_slice($p10, $o, $m));\n if($r + $r2 + $r3 + $r4 + $r5 + $r6 + $r7 + $r8 + $r9 + $r10 >= $d)\n {\n $l += 1;\n }\n }\n }\n}\nfor($m = 1; $m <= 1; $m++)\n{\n for($n = 0; $n < $a; $n++)\n {\n for($o = 0; $o <= $b - $m; $o++)\n {\n $p = $e[$n];\n $r = array_sum(array_slice($p, $o, $m));\n if($r >= $d)\n {\n $l -= 1;\n }\n }\n }\n}\nfor($m = 2; $m <= 2; $m++)\n{\n for($n = 0; $n < $a - 1; $n++)\n {\n for($o = 0; $o <= $b - $m; $o++)\n {\n $p = $e[$n];\n $p2 = $e[$n + 1];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n if($r + $r2 >= $d)\n {\n $l -= 1;\n }\n }\n }\n}\nfor($m = 3; $m <= 3; $m++)\n{\n for($n = 0; $n < $a - 2; $n++)\n {\n for($o = 0; $o <= $b - $m; $o++)\n {\n $p = $e[$n];\n $p2 = $e[$n + 1];\n $p3 = $e[$n + 2];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n if($r + $r2 + $r3 >= $d)\n {\n $l -= 1;\n }\n }\n }\n}\nfor($m = 4; $m <= 4; $m++)\n{\n for($n = 0; $n < $a - 3; $n++)\n {\n for($o = 0; $o <= $b - $m; $o++)\n {\n $p = $e[$n];\n $p2 = $e[$n + 1];\n $p3 = $e[$n + 2];\n $p4 = $e[$n + 3];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n $r4 = array_sum(array_slice($p4, $o, $m));\n if($r + $r2 + $r3 + $r4 >= $d)\n {\n $l -= 1;\n }\n }\n }\n}\nfor($m = 5; $m <= 5; $m++)\n{\n for($n = 0; $n < $a - 4; $n++)\n {\n for($o = 0; $o <= $b - $m; $o++)\n {\n $p = $e[$n];\n $p2 = $e[$n + 1];\n $p3 = $e[$n + 2];\n $p4 = $e[$n + 3];\n $p5 = $e[$n + 4];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n $r4 = array_sum(array_slice($p4, $o, $m));\n $r5 = array_sum(array_slice($p5, $o, $m));\n if($r + $r2 + $r3 + $r4 + $r5 >= $d)\n {\n $l -= 1;\n }\n }\n }\n}\nfor($m = 6; $m <= 6; $m++)\n{\n for($n = 0; $n < $a - 5; $n++)\n {\n for($o = 0; $o <= $b - $m; $o++)\n {\n $p = $e[$n];\n $p2 = $e[$n + 1];\n $p3 = $e[$n + 2];\n $p4 = $e[$n + 3];\n $p5 = $e[$n + 4];\n $p6 = $e[$n + 5];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n $r4 = array_sum(array_slice($p4, $o, $m));\n $r5 = array_sum(array_slice($p5, $o, $m));\n $r6 = array_sum(array_slice($p6, $o, $m));\n if($r + $r2 + $r3 + $r4 + $r5 + $r6 >= $d)\n {\n $l -= 1;\n }\n }\n }\n}\nfor($m = 7; $m <= 7; $m++)\n{\n for($n = 0; $n < $a - 6; $n++)\n {\n for($o = 0; $o <= $b - $m; $o++)\n {\n $p = $e[$n];\n $p2 = $e[$n + 1];\n $p3 = $e[$n + 2];\n $p4 = $e[$n + 3];\n $p5 = $e[$n + 4];\n $p6 = $e[$n + 5];\n $p7 = $e[$n + 6];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n $r4 = array_sum(array_slice($p4, $o, $m));\n $r5 = array_sum(array_slice($p5, $o, $m));\n $r6 = array_sum(array_slice($p6, $o, $m));\n $r7 = array_sum(array_slice($p7, $o, $m));\n if($r + $r2 + $r3 + $r4 + $r5 + $r6 + $r7 >= $d)\n {\n $l -= 1;\n }\n }\n }\n}\nfor($m = 8; $m <= 8; $m++)\n{\n for($n = 0; $n < $a - 7; $n++)\n {\n for($o = 0; $o <= $b - $m; $o++)\n {\n $p = $e[$n];\n $p2 = $e[$n + 1];\n $p3 = $e[$n + 2];\n $p4 = $e[$n + 3];\n $p5 = $e[$n + 4];\n $p6 = $e[$n + 5];\n $p7 = $e[$n + 6];\n $p8 = $e[$n + 7];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n $r4 = array_sum(array_slice($p4, $o, $m));\n $r5 = array_sum(array_slice($p5, $o, $m));\n $r6 = array_sum(array_slice($p6, $o, $m));\n $r7 = array_sum(array_slice($p7, $o, $m));\n $r8 = array_sum(array_slice($p8, $o, $m));\n if($r + $r2 + $r3 + $r4 + $r5 + $r6 + $r7 + $r8 >= $d)\n {\n $l -= 1;\n }\n }\n }\n}\nfor($m = 9; $m <= 9; $m++)\n{\n for($n = 0; $n < $a - 8; $n++)\n {\n for($o = 0; $o <= $b - $m; $o++)\n {\n $p = $e[$n];\n $p2 = $e[$n + 1];\n $p3 = $e[$n + 2];\n $p4 = $e[$n + 3];\n $p5 = $e[$n + 4];\n $p6 = $e[$n + 5];\n $p7 = $e[$n + 6];\n $p8 = $e[$n + 7];\n $p9 = $e[$n + 8];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n $r4 = array_sum(array_slice($p4, $o, $m));\n $r5 = array_sum(array_slice($p5, $o, $m));\n $r6 = array_sum(array_slice($p6, $o, $m));\n $r7 = array_sum(array_slice($p7, $o, $m));\n $r8 = array_sum(array_slice($p8, $o, $m));\n $r9 = array_sum(array_slice($p9, $o, $m));\n if($r + $r2 + $r3 + $r4 + $r5 + $r6 + $r7 + $r8 + $r9 >= $d)\n {\n $l -= 1;\n }\n }\n }\n}\nfor($m = 10; $m <= 10; $m++)\n{\n for($n = 0; $n < $a - 9; $n++)\n {\n for($o = 0; $o <= $b - $m; $o++)\n {\n $p = $e[$n];\n $p2 = $e[$n + 1];\n $p3 = $e[$n + 2];\n $p4 = $e[$n + 3];\n $p5 = $e[$n + 4];\n $p6 = $e[$n + 5];\n $p7 = $e[$n + 6];\n $p8 = $e[$n + 7];\n $p9 = $e[$n + 8];\n $p10 = $e[$n + 9];\n $r = array_sum(array_slice($p, $o, $m));\n $r2 = array_sum(array_slice($p2, $o, $m));\n $r3 = array_sum(array_slice($p3, $o, $m));\n $r4 = array_sum(array_slice($p4, $o, $m));\n $r5 = array_sum(array_slice($p5, $o, $m));\n $r6 = array_sum(array_slice($p6, $o, $m));\n $r7 = array_sum(array_slice($p7, $o, $m));\n $r8 = array_sum(array_slice($p8, $o, $m));\n $r9 = array_sum(array_slice($p9, $o, $m));\n $r10 = array_sum(array_slice($p10, $o, $m));\n if($r + $r2 + $r3 + $r4 + $r5 + $r6 + $r7 + $r8 + $r9 + $r10 >= $d)\n {\n $l -= 1;\n }\n }\n }\n}\nprint $l;\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "d4c9c448e411e456505fee3e6f0ca0c3", "src_uid": "9c766881f6415e2f53fb43b61f8f40b4", "difficulty": 1100.0} {"lang": "PHP", "source_code": "= $k) $photos++;\n\t\t\t}\n\t\t}\t\t\n\t}\n}\n\nprint $photos;\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "4460036eb970030a156fbc95659e3730", "src_uid": "9c766881f6415e2f53fb43b61f8f40b4", "difficulty": 1100.0} {"lang": "PHP", "source_code": " 1, 2 => 1, 3 => 0);\n$c = 0;\nfor($x = 1; $x <= $a; $x++)\n{\n $d = trim(fgets(STDIN));\n if($b[$d] == 1)\n {\n if($d == 1)\n {\n $b[1] = 1;\n if($b[2] == 0)\n {\n $b[2] = 1;\n }\n elseif($b[2] == 1)\n {\n $b[2] = 0;\n }\n if($b[3] == 0)\n {\n $b[3] = 1;\n }\n elseif($b[3] == 1)\n {\n $b[3] = 0;\n }\n }\n elseif($d == 2)\n {\n $b[2] = 1;\n if($b[1] == 0)\n {\n $b[1] = 1;\n }\n elseif($b[1] == 1)\n {\n $b[1] = 0;\n }\n if($b[3] == 0)\n {\n $b[3] = 1;\n }\n elseif($b[3] == 1)\n {\n $b[3] = 0;\n }\n }\n elseif($d == 3)\n {\n $b[3] = 1;\n if($b[1] == 0)\n {\n $b[1] = 1;\n }\n elseif($b[1] == 1)\n {\n $b[1] = 0;\n }\n if($b[2] == 0)\n {\n $b[2] = 1;\n }\n elseif($b[2] == 1)\n {\n $b[2] = 0;\n }\n }\n }\n else\n {\n $c = 1;\n break;\n }\n}\nif($c == 0)\n{\n print \"YES\";\n}\nelse\n{\n print \"NO\";\n}\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "25f91a14fe67cff686889922037a4861", "src_uid": "6c7ab07abdf157c24be92f49fd1d8d87", "difficulty": 900.0} {"lang": "PHP", "source_code": " 1, 2 => 1, 3 => 0);\n$c = 0;\nfor($x = 1; $x <= $a; $x++)\n{\n $d = trim(fgets(STDIN));\n if($b[$d] == TRUE)\n {\n if($d == 1)\n {\n if($b[2] == 0)\n {\n $b[2] = 1;\n }\n elseif($b[2] == 1)\n {\n $b[2] = 0;\n }\n if($b[3] == 0)\n {\n $b[3] = 1;\n }\n elseif($b[3] == 1)\n {\n $b[3] = 0;\n }\n }\n elseif($d == 2)\n {\n if($b[1] == 0)\n {\n $b[1] = 1;\n }\n elseif($b[1] == 1)\n {\n $b[1] = 0;\n }\n if($b[3] == 0)\n {\n $b[3] = 1;\n }\n elseif($b[3] == 1)\n {\n $b[3] = 0;\n }\n }\n elseif($d == 3)\n {\n if($b[1] == 0)\n {\n $b[1] = 1;\n }\n elseif($b[1] == 1)\n {\n $b[1] = 0;\n }\n if($b[3] == 0)\n {\n $b[3] = 1;\n }\n elseif($b[3] == 1)\n {\n $b[3] = 0;\n }\n }\n }\n else\n {\n $c = 1;\n break;\n }\n}\nif($c == 0)\n{\n print \"YES\";\n}\nelse\n{\n print \"NO\";\n}\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "8fc6eebc58d0adf3d325e7339bb9539e", "src_uid": "6c7ab07abdf157c24be92f49fd1d8d87", "difficulty": 900.0} {"lang": "PHP", "source_code": "';\n\n if (is_array($data)) {\n print_r($data);\n } else {\n var_dump($data);\n }\n\n if ($die) {\n die();\n }\n\n echo '';\n}\n\nfunction stdin() {\n $stdin = @fopen('data.txt', 'r');\n if (!$stdin) {\n $stdin = fopen('php://stdin', 'r');\n }\n\n return $stdin;\n}\n\nfunction g() {\n global $stdin;\n return trim(fgets($stdin));\n}\n\n$stdin = stdin();\n/****************************************************** Solving block *****************************************************/\nlist($x1, $y1, $x2, $y2, $x3, $y3) = explode(' ', g());\n\nfunction pifagor($x1, $y1, $x2, $y2, $x3, $y3) {\n $a = pow(abs($x1-$x2), 2) + pow(abs($y1-$y2), 2);\n $b = pow(abs($x1-$x3), 2) + pow(abs($y1-$y3), 2);\n $c = pow(abs($x3-$x2), 2) + pow(abs($y3-$y2), 2);\n\n $max = $a;\n if($b > $max) $max = $b;\n if($c > $max) $max = $c;\n\n return $max == $a + $b + $c - $max;\n}\n\n$pifagor = pifagor($x1, $y1, $x2, $y2, $x3, $y3);\n\n$almost =\n pifagor($x1+1, $y1, $x2, $y2, $x3, $y3) ||\n pifagor($x1-1, $y1, $x2, $y2, $x3, $y3) ||\n pifagor($x1, $y1+1, $x2, $y2, $x3, $y3) ||\n pifagor($x1, $y1-1, $x2, $y2, $x3, $y3) ||\n\n pifagor($x1, $y1, $x2+1, $y2, $x3, $y3) ||\n pifagor($x1, $y1, $x2-1, $y2, $x3, $y3) ||\n pifagor($x1, $y1, $x2, $y2+1, $x3, $y3) ||\n pifagor($x1, $y1, $x2, $y2-1, $x3, $y3) ||\n\n pifagor($x1, $y1, $x2, $y2, $x3+1, $y3) ||\n pifagor($x1, $y1, $x2, $y2, $x3-1, $y3) ||\n pifagor($x1, $y1, $x2, $y2, $x3, $y3+1) ||\n pifagor($x1, $y1, $x2, $y2, $x3, $y3-1) ||\n\n false;\n\nif($pifagor) {\n echo 'RIGHT';\n} else if($almost) {\n echo 'ALMOST';\n} else {\n echo 'NEITHER';\n}\n\n\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "f47ba1270bc2a71ac35318bba05e1f35", "src_uid": "8324fa542297c21bda1a4aed0bd45a2d", "difficulty": 1500.0} {"lang": "PHP", "source_code": "x = $x;\n\t\t$this->y = $y;\n\t}\n\tstatic function read() {\n\t\t$x = readInt();\n\t\t$y = readInt();\n\t\treturn new Point($x, $y);\n\t}\n\tfunction eps($d) {\n\t\tfor ($dx = -$d; $dx <= $d; $dx++)\n\t\t\tfor ($dy = -$d; $dy <= $d; $dy++)\n\t\t\t\tif (abs($dx) + abs($dy) <= $d)\n\t\t\t\t\tyield new Point($this->x + $dx, $this->y + $dy);\n\t}\n}\n\nfunction pr($a, $b, $c) {\n\treturn ($a->x - $b->x) * ($c->x - $b->x) + ($a->y - $b->y) * ($c->y - $b->y) == 0;\n}\nfunction area($a, $b, $c) {\n\treturn ($a->x - $b->x) * ($c->y - $b->y) - ($a->y - $b->y) * ($c->x - $b->x);\n}\nfunction isRight($a, $b, $c) {\n\treturn (pr($a, $b, $c) || pr($b, $c, $a) || pr($c, $a, $b)) && area($a, $b, $c) != 0;\n}\nfunction d($a, $b) {\n\treturn abs($a->x - $b->x) + abs($a->y - $b->y);\n}\n\nfunction check($maxDiff) {\n\tglobal $a;\n\tforeach($a[0]->eps($maxDiff) as $p0)\n\t\tforeach($a[1]->eps($maxDiff) as $p1)\n\t\t\tforeach($a[2]->eps($maxDiff) as $p2)\n\t\t\t\tif (isRight($p0, $p1, $p2) && d($p0, $a[0]) + d($p1, $a[1]) + d($p2, $a[2]) <= $maxDiff)\n\t\t\t\t\treturn true;\n\treturn false;\n}\n\n$a = array_map(function() { return Point::read(); }, range(0, 2));\nif (check(0))\n\tprintf(\"RIGHT\\n\");\nelse if (check(1))\n\tprintf(\"ALMOST\\n\");\nelse\n\tprintf(\"NEITHER\\n\");\n?>\n", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "76cbf2944c288f2dc242a916bc4d9d98", "src_uid": "8324fa542297c21bda1a4aed0bd45a2d", "difficulty": 1500.0} {"lang": "PHP", "source_code": " $r ? $ans : $r);", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "e7b75d3789b987d16db296e7a913daa6", "src_uid": "42f25d492bddc12d3d89d39315d63cb9", "difficulty": 800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "14915cb2ad238ca1a40e60d3d0a4ccb7", "src_uid": "42f25d492bddc12d3d89d39315d63cb9", "difficulty": 800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "82903eab05a7a0c748296a35844b2f53", "src_uid": "42f25d492bddc12d3d89d39315d63cb9", "difficulty": 800.0} {"lang": "PHP", "source_code": "= $maxb) {\n $res = $r; // \u043d\u0435\u0442 \u0432\u044b\u0433\u043e\u0434\u044b\n} else {\n $act = ($r - ($r % $mins)) / $mins;\n $r -= $act*$mins;\n\n $r += $act*$maxb;\n $res = $r;\n}\necho $res;\n\n\n/*\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013*/\nif ($debag === 1) {\n echo '
' . round(microtime(true) - $t1, 3) . ' sec';\n}\n", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "3c5749227f51494ab34e30cb5a010f99", "src_uid": "42f25d492bddc12d3d89d39315d63cb9", "difficulty": 800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "db478bd2f12a7d6162c3b7c9db38f118", "src_uid": "956228e31679caa9952b216e010f9773", "difficulty": 1800.0} {"lang": "PHP", "source_code": "$v)\n {\n if($k == 0)\n {\n $cleansed_votes_list[0] = $v;\n continue;\n }\n if($votes_list[0]/2 >= $v)\n $cleansed_votes_list[$k] = $v;\n }\n \n $sum = 0;\n\n foreach($cleansed_votes_list as $k => $v)\n {\n $sum += $v;\n $allies[] = $k+1;\n\n if($sum > $half_votes_count)\n return $allies;\n \n }\n\n return false;\n}\n\n$n = explode(\" \", trim(fgets(STDIN)));\n\n$nPartiesCount = $n[0];\n$aData = [];\n\nif( !is_nan($nPartiesCount) )\n{\n $aData = explode(\" \", trim(fgets(STDIN))); \n}\n\n$result = getAlliesList($aData);\nif($result)\n{\n echo count($result).PHP_EOL;\n echo implode(\" \", $result);\n}\nelse\n echo \"0\";\n\n\n", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "8aeca9592248bd6b0438ed10313a52b5", "src_uid": "0a71fdaaf08c18396324ad762b7379d7", "difficulty": 800.0} {"lang": "PHP", "source_code": " $mainSum / 2) {\n print((count($arrOk)+1).\"\\n\");\n print(\"1 \");\n for ($i = 0; $i < count($arrOk); $i++) {\n print(($arrOk[$i]+1).\" \");\n }\n} else {\n print(0);\n}\n/*\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013\u2013*/\nif ($debag === 1) {\n echo '
' . round(microtime(true) - $t1, 3) . ' sec';\n}\n", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "c3d47d7c705a3a34b5974401ec577b43", "src_uid": "0a71fdaaf08c18396324ad762b7379d7", "difficulty": 800.0} {"lang": "PHP", "source_code": " ", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "13207d9561fc06adff4c4020ccf7d315", "src_uid": "289a55128be89bb86a002d218d31b57f", "difficulty": 800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "0458040532556c9d189b9c8a093b05eb", "src_uid": "89b51a31e00424edd1385f2120028b9d", "difficulty": 1600.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "2e8a3acfa7855036e9838b2508a95fc1", "src_uid": "89b51a31e00424edd1385f2120028b9d", "difficulty": 1600.0} {"lang": "PHP", "source_code": " $c[$d])\n {\n array_push($b, $c[$d]);\n array_push($b, $b[$d]);\n unset($c[$d]);\n unset($b[$d]);\n $d++;\n if(count($c) == 0)\n {\n $e = 1;\n break;\n }\n }\n else\n {\n array_push($c, $b[$d]);\n array_push($c, $c[$d]);\n unset($b[$d]);\n unset($c[$d]);\n $d++;\n if(count($b) == 0)\n {\n $e = 2;\n break;\n }\n }\n}\nif($e == 0)\n{\n print \"-1\";\n}\nelseif($e == 1)\n{\n print $x . \" 1\";\n}\nelseif($e == 2)\n{\n print $x . \" 2\";\n}\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "4b5d7b5e7f1b699b519540e31159edf4", "src_uid": "f587b1867754e6958c3d7e0fe368ec6e", "difficulty": 1400.0} {"lang": "PHP", "source_code": "= $f[count($f) - 1])\n {\n break;\n }\n else\n {\n $i[count($i)] = $h;\n }\n}\n$k = array_merge($f, $i);\nsort($k);\n$l = 0;\n$m = 0;\nfor($x = 0; $x < count($k); $x++)\n{\n $m += $c;\n if(($m >= $a) && ($x != (count($k) - 1)))\n {\n $l = 1;\n break;\n }\n}\nif($l == 0)\n{\n print \"NO\";\n}\nelse\n{\n print \"YES\";\n}\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "5812a0ec75b9bc81bbe5b7594c018d8f", "src_uid": "32c866d3d394e269724b4930df5e4407", "difficulty": 1100.0} {"lang": "PHP", "source_code": "= 0; $x--)\n {\n if($c[$x] == 1)\n {\n break;\n }\n }\n $f = 0;\n if($x == $e)\n {\n $f = 1;\n }\n else\n {\n $d++;\n $e = $x;\n }\n }\n}\nif($f == 0)\n{\n print $d;\n}\nelse\n{\n print \"-1\";\n}\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "99d165df79e3dc62147993139f0e4095", "src_uid": "c08d2ecdfc66cd07fbbd461b1f069c9e", "difficulty": 800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "c8b73063ce9f563ccf4ad6876b8052cd", "src_uid": "c08d2ecdfc66cd07fbbd461b1f069c9e", "difficulty": 800.0} {"lang": "PHP", "source_code": " $y ? $y : $x;\r\n }\r\n public static function getMaxValue($x, $y) {\r\n return $x > $y ? $x : $y;\r\n }\r\n}", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "b7fc77daf703f782b8c413703ce73651", "src_uid": "5cd113a30bbbb93d8620a483d4da0349", "difficulty": 800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "690b33f85924793efaf452d4063359d0", "src_uid": "4fdd4027dd9cd688fcc70e1076c9b401", "difficulty": 1300.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "88f2bc9281c6e8a4a56793e905210348", "src_uid": "30e95770f12c631ce498a2b20c2931c7", "difficulty": 1100.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "fc4bd2e955bb8dbdeeaf4ba448a24adc", "src_uid": "a5002ddf9e792cb4b4685e630f1e1b8f", "difficulty": 1000.0} {"lang": "PHP", "source_code": " $a) {\n $result = ((($l + $r) - $diff) / 2 + $a) * 2;\n } else {\n $result = (($l + $r) + $diff) + ($a - $diff) - ($a - $diff) % 2;\n }\n } else if ($l == $r) {\n $result = $l + $l + $a - $a % 2;\n }\n print $result;\n fprintf(STDOUT, \"$d\\n\", $result);\n}", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "863a02176ab7dda7c61cc16691d6c576", "src_uid": "e8148140e61baffd0878376ac5f3857c", "difficulty": 800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "ba2dd18588b5e667e57e84005c13d931", "src_uid": "f34f3f974a21144b9f6e8615c41830f5", "difficulty": 800.0} {"lang": "PHP", "source_code": "\",\"v\", \"<\"];\n$counter_clockwise_stats = array_reverse($clockwise_stats);\n\n\n$is_cw = false;\n$is_ccw = false;\n\n$mod = $n%4;\n$start_pos = array_search($start, $clockwise_stats);\nif($start_pos!==false){\n \t$end_pos = ($start_pos+$mod)%4;\n\tif($end == $clockwise_stats[$end_pos]){\n\t $is_cw = true;\n\t}\n}\n\n$start_pos_ccw = array_search($start, $counter_clockwise_stats);\nif($start_pos_ccw!==false){\n\n\t$end_pos_ccw = ($start_pos_ccw + $mod)%4;\n\tif($end == $counter_clockwise_stats[$end_pos_ccw]){\n\t $is_ccw = true;\n\t}\n}\n\nif($is_cw && $is_ccw)\n{\n echo \"undefined\";\n}elseif($is_cw){\n echo \"cw\";\n}elseif($is_ccw){\n echo \"ccw\";\n}else{\n echo \"undefined\";\n}\n", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "8848a26dab6f4bf422f1f2c4c7c46c7e", "src_uid": "fb99ef80fd21f98674fe85d80a2e5298", "difficulty": 900.0} {"lang": "PHP", "source_code": "\", \"v\", \"<\");\n $e = $c % 4;\n if($b == $d[$e])\n {\n print \"cw\";\n }\n else\n {\n $f = array(\"^\", \"<\", \"v\", \">\");\n $g = $c % 4;\n if($b == $f[$g])\n {\n print \"ccw\";\n }\n }\n}\nelseif($a == \">\")\n{\n $d = array(\">\", \"v\", \"<\", \"^\");\n $e = $c % 4;\n if($b == $d[$e])\n {\n print \"cw\";\n }\n else\n {\n $f = array(\">\", \"^\", \"<\", \"v\");\n $g = $c % 4;\n if($b == $f[$g])\n {\n print \"ccw\";\n }\n }\n}\nelseif($a == \"v\")\n{\n $d = array(\"v\", \"<\", \"^\", \">\");\n $e = $c % 4;\n if($b == $d[$e])\n {\n print \"cw\";\n }\n else\n {\n $f = array(\"v\", \">\", \"^\", \"<\");\n $g = $c % 4;\n if($b == $f[$g])\n {\n print \"ccw\";\n }\n }\n}\nelseif($a == \"<\")\n{\n $d = array(\"<\", \"^\", \">\", \"v\");\n $e = $c % 4;\n if($b == $d[$e])\n {\n print \"cw\";\n }\n else\n {\n $f = array(\"<\", \"v\", \">\", \"^\");\n $g = $c % 4;\n if($b == $f[$g])\n {\n print \"ccw\";\n }\n }\n}\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "dde519b06ef528aa9a4c5128eb110774", "src_uid": "fb99ef80fd21f98674fe85d80a2e5298", "difficulty": 900.0} {"lang": "PHP", "source_code": "\", \"v\", \"<\");\n $e = $c % 4;\n if($b == $d[$e])\n {\n print \"cw\";\n }\n else\n {\n $f = array(\"^\", \"<\", \"v\", \">\");\n $g = $c % 4;\n if($b == $f[$g])\n {\n print \"ccw\";\n }\n else\n {\n print \"undefined\";\n }\n }\n}\nelseif($a == \">\")\n{\n $d = array(\">\", \"v\", \"<\", \"^\");\n $e = $c % 4;\n if($b == $d[$e])\n {\n print \"cw\";\n }\n else\n {\n $f = array(\">\", \"^\", \"<\", \"v\");\n $g = $c % 4;\n if($b == $f[$g])\n {\n print \"ccw\";\n }\n else\n {\n print \"undefined\";\n }\n }\n}\nelseif($a == \"v\")\n{\n $d = array(\"v\", \"<\", \"^\", \">\");\n $e = $c % 4;\n if($b == $d[$e])\n {\n print \"cw\";\n }\n else\n {\n $f = array(\"v\", \">\", \"^\", \"<\");\n $g = $c % 4;\n if($b == $f[$g])\n {\n print \"ccw\";\n }\n else\n {\n print \"undefined\";\n }\n }\n}\nelseif($a == \"<\")\n{\n $d = array(\"<\", \"^\", \">\", \"v\");\n $e = $c % 4;\n if($b == $d[$e])\n {\n print \"cw\";\n }\n else\n {\n $f = array(\"<\", \"v\", \">\", \"^\");\n $g = $c % 4;\n if($b == $f[$g])\n {\n print \"ccw\";\n }\n else\n {\n print \"undefined\";\n }\n }\n}\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "81cb22dc6f9ab302cda5f07e3ca76200", "src_uid": "fb99ef80fd21f98674fe85d80a2e5298", "difficulty": 900.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "17e8b5e2994aebb0f555ca78dd155336", "src_uid": "2acf686862a34c337d1d2cbc0ac3fd11", "difficulty": 1000.0} {"lang": "PHP", "source_code": " $h) && ($a < $i)) || (($f > $h) && ($f < $i)) || (($g > $h) && ($g < $i)))\n{\n print \"NO\";\n}\nelse\n{\n print \"YES\";\n}\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "17857e11c41e9c8352a10104baa55551", "src_uid": "912c8f557a976bdedda728ba9f916c95", "difficulty": 1400.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "cdff4693c7d232e2a9574a9da0a8abce", "src_uid": "bd0bc809d52e0a17da07ccfd450a4d79", "difficulty": 1100.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "bca5502d8e05c4d86d4ddd1adc48b7e6", "src_uid": "414cc57550e31d98c1a6a56be6722a12", "difficulty": 1000.0} {"lang": "PHP", "source_code": " $y) $ans += $cur;\n\t$cur = in();\n\tif($vz < 0) $ans += $cur;\n\t$cur = in();\n\tif($vz > $z) $ans += $cur;\n\t$cur = in();\n\tif($vx < 0) $ans += $cur;\n\t$cur = in();\n\tif($vx > $x) $ans += $cur;\n\techo $ans;\n?>\n", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "c69f8e51a80025babc5d31c5bf018e3d", "src_uid": "c7889a8f64c57cf7be4df870f68f749e", "difficulty": 1600.0} {"lang": "PHP", "source_code": "$x1) $s+=$a6;\n\t if($y>$y1) $s+=$a2;\n\t if($z>$z1) $s+=$a4;\n\t echo $s;\n?>\n\t \t\t\t \t\t\t\t \t \t\t \t\t", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "5369c883527cd01c8ca927db417671a6", "src_uid": "c7889a8f64c57cf7be4df870f68f749e", "difficulty": 1600.0} {"lang": "PHP", "source_code": " $y) $r = $r + $a2;\nif ($z1 < 0) $r = $r + $a3;\nif ($z1 > $z) $r = $r + $a4;\nif ($x1 < 0) $r = $r + $a5;\nif ($x1 > $x) $r = $r + $a6;\n\necho \"$r\\n\";\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "6f9a3fe94a8758a901b24c92b9fe1054", "src_uid": "c7889a8f64c57cf7be4df870f68f749e", "difficulty": 1600.0} {"lang": "PHP", "source_code": " 0)\n {\n if($c > 0)\n {\n $j = $h[count($h) - 1];\n $h[count($h)] = $j + 2;\n }\n else\n {\n if($l == 0)\n {\n $j = $h[count($h) - 1];\n $h[count($h)] = $j + 1;\n $l = 1;\n }\n elseif($l == 1)\n {\n $j = $h[count($h) - 1];\n $h[count($h)] = $j;\n }\n }\n }\n else\n {\n if($c > 0)\n {\n $j = $h[count($h) - 1];\n $h[count($h)] = $j + 1;\n }\n else\n {\n if($k == 0)\n {\n $j = $h[count($h) - 1];\n $h[count($h)] = $j;\n $k = 1;\n $m = 1;\n }\n elseif($k == 1)\n {\n if($m == 0)\n {\n $j = $h[count($h) - 1];\n $h[count($h)] = $j - 1;\n $m = 1;\n }\n else\n {\n $j = $h[count($h) - 1];\n $h[count($h)] = $j - 2;\n }\n }\n }\n }\n}\nprint array_sum($h);\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "330cf18bd60ce8fa0611bb1fa81aaaec", "src_uid": "382475475427f0e76c6b4ac6e7a02e21", "difficulty": 1600.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "28db6813b09299b5c66f4095cbe4116b", "src_uid": "382475475427f0e76c6b4ac6e7a02e21", "difficulty": 1600.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "d10e0bd0b173f6771122d7199f0e6580", "src_uid": "f63fc2d97fd88273241fce206cc217f2", "difficulty": 1500.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "5d3e5e7a0b33ba4529571dbb49e1e269", "src_uid": "f63fc2d97fd88273241fce206cc217f2", "difficulty": 1500.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "bcfce03cb5cd38386d3b42bda2adccb0", "src_uid": "8b26ca1ca2b28166c3d25dceb1f3d49f", "difficulty": null} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "8a426292ddb61a0555401bfe6157b1b5", "src_uid": "8b26ca1ca2b28166c3d25dceb1f3d49f", "difficulty": null} {"lang": "PHP", "source_code": "$a){\n return true;\n }\n elseif ($b==$a){\n $flag=0;\n return true;\n }\n else{\n return false;\n }\n }\n elseif ($flag==0){\n if ($b==$a){\n return true;\n }\n elseif ($b<$a){\n $flag=-1;\n return true;\n }\n else{\n return false;\n }\n }\n else{\n if ($b<$a){\n return true;\n }\n else{\n return false;\n }\n }\n}\n$status=true;\nfor ($i=1;$i", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "bfb790c7e8c155ab70526d0f61dd788c", "src_uid": "5482ed8ad02ac32d28c3888299bf3658", "difficulty": 1000.0} {"lang": "PHP", "source_code": "$a){\n return true;\n }\n elseif ($b==$a){\n $flag=0;\n return true;\n }\n else{\n $flag=-1;\n return true;\n }\n }\n elseif ($flag==0){\n if ($b==$a){\n return true;\n }\n elseif ($b<$a){\n $flag=-1;\n return true;\n }\n else{\n return false;\n }\n }\n else{\n if ($b<$a){\n return true;\n }\n else{\n return false;\n }\n }\n}\n$status=true;\nfor ($i=1;$i", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "7a5973194413aef5d05f41dd2352090a", "src_uid": "5482ed8ad02ac32d28c3888299bf3658", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "efdb55c90b8bf10bb076a7d9014ec39c", "src_uid": "2ff30d9c4288390fd7b5b37715638ad9", "difficulty": 1200.0} {"lang": "PHP", "source_code": " \"January\", 2 => \"February\", 3 => \"March\", 4 => \"April\", 5 => \"May\", 6 => \"June\", 7 => \"July\", 8 => \"August\", 9 => \"September\", 10 => \"October\", 11 => \"November\", 12 => \"December\");\nfscanf(STDIN, \"%s\", $name);\nfscanf(STDIN, \"%d\", $plus);\n$current = array_search($name, $months);\n$current += $plus;\nwhile($current>12) $current -= 12;\necho $months[$current];\n?>\n", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "f2d67203435e5402cdce310972c9432b", "src_uid": "a307b402b20554ce177a73db07170691", "difficulty": 900.0} {"lang": "PHP", "source_code": "=0||($x-$t-1)%$s==0&&($x-$t-1)/$s>0) echo \"YES\\n\";\nelse echo \"NO\\n\";\n\n\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "215e48797799aba82da5a8ff490a948f", "src_uid": "3baf9d841ff7208c66f6de1b47b0f952", "difficulty": 900.0} {"lang": "PHP", "source_code": "= $t + $p && ($w -$t) % $p == 0) || \n($w >= $t + $p + 1 && ($w -$t -1) % $p == 0)) \necho 'YES';\nelse echo 'NO';", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "14b4dc641b41fbe6cb0de51fe59f66df", "src_uid": "3baf9d841ff7208c66f6de1b47b0f952", "difficulty": 900.0} {"lang": "PHP", "source_code": " $a)\n{\n if(($d < $b) && ($e < $b))\n {\n print \"NO\";\n }\n else\n {\n $f = $d % $b;\n $g = $e % $b;\n if(($f == 0) || ($g == 0))\n {\n print \"YES\";\n }\n else\n {\n print \"NO\";\n }\n }\n}\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "e73b2e77fec8efb6970981939f1272dd", "src_uid": "3baf9d841ff7208c66f6de1b47b0f952", "difficulty": 900.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "a63c3f41a37153914f7f409fcb3f7ad6", "src_uid": "2a75f68a7374b90b80bb362c6ead9a35", "difficulty": 1000.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "d71094b2c84acf29d3a0f10f40c894de", "src_uid": "d6929926b44c2d5b1a8e6b7f965ca1bb", "difficulty": 800.0} {"lang": "PHP", "source_code": "= 0; $x--)\n {\n rsort($c);\n $j = 0;\n for($y = 0; $y < count($c); $y++)\n {\n if($c[$y] < $e[$x])\n {\n $j = 1;\n break;\n }\n }\n if($j == 0)\n {\n $c[count($c)] = $e[$x];\n array_splice($e, $x, 1);\n }\n else\n {\n $c[count($c)] = $e[$x];\n array_splice($e, $x, 1);\n $e[count($e)] = $c[$y];\n array_splice($c, $y, 1);\n break;\n }\n }\n rsort($c);\n $i = array_merge($e, $c);\n print implode($i);\n }\n else\n {\n rsort($c);\n $i = array_merge($e, $c);\n print implode($i);\n }\n }\n else\n {\n print implode($e);\n }\n}\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "82a7c64f1a2b2155b9519c0f99ddfb1e", "src_uid": "bc31a1d4a02a0011eb9f5c754501cd44", "difficulty": 1700.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "01c2682f0d7c778e2d6152f0c24089a3", "src_uid": "d0f5174bb0bcca5a486db327b492bf33", "difficulty": 1400.0} {"lang": "PHP", "source_code": "\n", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "ee76ef5b9ad8d634d8d96abb641acaf3", "src_uid": "d0f5174bb0bcca5a486db327b492bf33", "difficulty": 1400.0} {"lang": "PHP", "source_code": "= 0)\n {\n $c2--;\n $g++;\n if($a2 == 0)\n {\n break;\n }\n }\n else\n {\n $e2 += $c;\n break;\n }\n }\n $b2 = $b;\n for($x = 1; $x <= $b; $x++)\n {\n $e2 -= $d;\n if($e2 >= 0)\n {\n $b2--;\n $g++;\n if($b2 == 0)\n {\n break;\n }\n }\n else\n {\n $e2 += $d;\n break;\n }\n }\n print $g;\n}\nelse\n{\n $b2 = $b;\n $e2 = $e;\n $g = 0;\n for($x = 1; $x <= $b; $x++)\n {\n $e2 -= $d;\n if($e2 >= 0)\n {\n $b2--;\n $g++;\n if($b2 == 0)\n {\n break;\n }\n }\n else\n {\n $e2 += $d;\n break;\n }\n }\n $a2 = $a;\n for($x = 1; $x <= $a; $x++)\n {\n $e2 -= $c;\n if($e2 >= 0)\n {\n $c2--;\n $g++;\n if($a2 == 0)\n {\n break;\n }\n }\n else\n {\n $e2 += $c;\n break;\n }\n }\n print $g;\n}\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "8907d5257557c5d39a1c3abc19d3d535", "src_uid": "2be8e0b8ad4d3de2930576c0209e8b91", "difficulty": 1000.0} {"lang": "PHP", "source_code": " 0) {\n $left -= (($kmin - 1) * $amin);\n\n if ($left > 0) {\n $r1 = min($left, $amin + $amax);\n } else {\n $r1 = 0;\n }\n} else {\n $r1 = 0;\n}\n\necho $r1;\n\n// max value\n\n$left = $n - ($kmin * $amin);\nif ($left > 0) {\n\n $r2 = $amin + min(floor($left / $kmax), $amax);\n} else {\n $r2 = floor($left / $kmin);\n}\n\necho ' ', $r2;", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "8bc0e0f39c605853b880828814577950", "src_uid": "2be8e0b8ad4d3de2930576c0209e8b91", "difficulty": 1000.0} {"lang": "PHP", "source_code": " $value)\n {\n if (!empty($value))\n {\n $sum = array_sum($value);\n $max = max($value);\n $min = min($value);\n\n if ($sum <= $r && $sum >= $l && $x <= ($max - $min))\n {\n $count++;\n }\n }\n }\n}\n\necho $count;\n\n/**\n * Get all the sub arrays of a given array\n *\n * @param array $difficulties The given array\n *\n * @return array All the sub arrays\n */\nfunction subArrays($difficulties)\n{\n $len = count($difficulties);\n $list = array();\n\n for ($i = 1; $i < (1 << $len); $i++)\n {\n $subArray = array();\n\n for ($j = 0; $j < $len; $j++)\n {\n if ($i & (1 << $j))\n {\n $subArray[] = (int)$difficulties[$j];\n }\n }\n\n $list[] = $subArray;\n }\n\n return $list;\n}", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "f018f2d85c69bd34e600be3ae20d26e7", "src_uid": "0d43104a0de924cdcf8e4aced5aa825d", "difficulty": 1400.0} {"lang": "PHP", "source_code": " 1)\n{\n for($x = 0; $x < $a - 1; $x++)\n {\n for($x2 = $x + 1; $x2 < $a; $x2++)\n {\n $g = $e[$x] + $e[$x2];\n $h = min($e[$x], $e[$x2]);\n $i = max($e[$x], $e[$x2]);\n $j = $i - $h;\n if(($g >= $b) && ($g <= $c) && ($j >= $d))\n {\n $f++;\n }\n }\n }\n if($a > 2)\n {\n for($x = 0; $x < $a - 2; $x++)\n {\n for($x2 = $x + 1; $x2 < $a - 1; $x2++)\n {\n for($x3 = $x2 + 1; $x3 < $a; $x3++)\n {\n $g = $e[$x] + $e[$x2] + $e[$x3];\n $h = min($e[$x], $e[$x2], $e[$x3]);\n $i = max($e[$x], $e[$x2], $e[$x3]);\n $j = $i - $h;\n if(($g >= $b) && ($g <= $c) && ($j >= $d))\n {\n $f++;\n }\n }\n }\n }\n if($a > 3)\n {\n for($x = 0; $x < $a - 3; $x++)\n {\n for($x2 = $x + 1; $x2 < $a - 2; $x2++)\n {\n for($x3 = $x2 + 1; $x3 < $a - 1; $x3++)\n {\n for($x4 = $x3 + 1; $x4 < $a; $x4++)\n {\n $g = $e[$x] + $e[$x2] + $e[$x3] + $e[$x4];\n $h = min($e[$x], $e[$x2], $e[$x3], $e[$x4]);\n $i = max($e[$x], $e[$x2], $e[$x3], $e[$x4]);\n $j = $i - $h;\n if(($g >= $b) && ($g <= $c) && ($j >= $d))\n {\n $f++;\n }\n }\n }\n }\n }\n if($a > 4)\n {\n for($x = 0; $x < $a - 4; $x++)\n {\n for($x2 = $x + 1; $x2 < $a - 3; $x2++)\n {\n for($x3 = $x2 + 1; $x3 < $a - 2; $x3++)\n {\n for($x4 = $x3 + 1; $x4 < $a - 1; $x4++)\n {\n for($x5 = $x4 + 1; $x5 < $a; $x5++)\n {\n $g = $e[$x] + $e[$x2] + $e[$x3] + $e[$x4] + $e[$x5];\n $h = min($e[$x], $e[$x2], $e[$x3], $e[$x4], $e[$x5]);\n $i = max($e[$x], $e[$x2], $e[$x3], $e[$x4], $e[$x5]);\n $j = $i - $h;\n if(($g >= $b) && ($g <= $c) && ($j >= $d))\n {\n $f++;\n }\n }\n }\n }\n }\n }\n if($a > 5)\n {\n for($x = 0; $x < $a - 5; $x++)\n {\n for($x2 = $x + 1; $x2 < $a - 4; $x2++)\n {\n for($x3 = $x2 + 1; $x3 < $a - 3; $x3++)\n {\n for($x4 = $x3 + 1; $x4 < $a - 2; $x4++)\n {\n for($x5 = $x4 + 1; $x5 < $a - 1; $x5++)\n {\n for($x6 = $x5 + 1; $x6 < $a; $x6++)\n {\n $g = $e[$x] + $e[$x2] + $e[$x3] + $e[$x4] + $e[$x5] + $e[$x6];\n $h = min($e[$x], $e[$x2], $e[$x3], $e[$x4], $e[$x5], $e[$x6]);\n $i = max($e[$x], $e[$x2], $e[$x3], $e[$x4], $e[$x5], $e[$x6]);\n $j = $i - $h;\n if(($g >= $b) && ($g <= $c) && ($j >= $d))\n {\n $f++;\n }\n }\n }\n }\n }\n }\n }\n if($a > 6)\n {\n for($x = 0; $x < $a - 6; $x++)\n {\n for($x2 = $x + 1; $x2 < $a - 5; $x2++)\n {\n for($x3 = $x2 + 1; $x3 < $a - 4; $x3++)\n {\n for($x4 = $x3 + 1; $x4 < $a - 3; $x4++)\n {\n for($x5 = $x4 + 1; $x5 < $a - 2; $x5++)\n {\n for($x6 = $x5 + 1; $x6 < $a - 1; $x6++)\n {\n for($x7 = $x6 + 1; $x7 < $a; $x7++)\n {\n $g = $e[$x] + $e[$x2] + $e[$x3] + $e[$x4] + $e[$x5] + $e[$x6] + $e[$x7];\n $h = min($e[$x], $e[$x2], $e[$x3], $e[$x4], $e[$x5], $e[$x6], $e[$x7]);\n $i = max($e[$x], $e[$x2], $e[$x3], $e[$x4], $e[$x5], $e[$x6], $e[$x7]);\n $j = $i - $h;\n if(($g >= $b) && ($g <= $c) && ($j >= $d))\n {\n $f++;\n }\n }\n }\n }\n }\n }\n }\n }\n if($a > 7)\n {\n for($x = 0; $x < $a - 7; $x++)\n {\n for($x2 = $x + 1; $x2 < $a - 6; $x2++)\n {\n for($x3 = $x2 + 1; $x3 < $a - 5; $x3++)\n {\n for($x4 = $x3 + 1; $x4 < $a - 4; $x4++)\n {\n for($x5 = $x4 + 1; $x5 < $a - 3; $x5++)\n {\n for($x6 = $x5 + 1; $x6 < $a - 2; $x6++)\n {\n for($x7 = $x6 + 1; $x7 < $a - 1; $x7++)\n {\n for($x8 = $x7 + 1; $x8 < $a; $x8++)\n {\n $g = $e[$x] + $e[$x2] + $e[$x3] + $e[$x4] + $e[$x5] + $e[$x6] + $e[$x7] + $e[$x8];\n $h = min($e[$x], $e[$x2], $e[$x3], $e[$x4], $e[$x5], $e[$x6], $e[$x7], $e[$x8]);\n $i = max($e[$x], $e[$x2], $e[$x3], $e[$x4], $e[$x5], $e[$x6], $e[$x7], $e[$x8]);\n $j = $i - $h;\n if(($g >= $b) && ($g <= $c) && ($j >= $d))\n {\n $f++;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n if($a > 8)\n {\n for($x = 0; $x < $a - 8; $x++)\n {\n for($x2 = $x + 1; $x2 < $a - 7; $x2++)\n {\n for($x3 = $x2 + 1; $x3 < $a - 6; $x3++)\n {\n for($x4 = $x3 + 1; $x4 < $a - 5; $x4++)\n {\n for($x5 = $x4 + 1; $x5 < $a - 4; $x5++)\n {\n for($x6 = $x5 + 1; $x6 < $a - 3; $x6++)\n {\n for($x7 = $x6 + 1; $x7 < $a - 2; $x7++)\n {\n for($x8 = $x7 + 1; $x8 < $a - 1; $x8++)\n {\n for($x9 = $x8 + 1; $x9 < $a; $x9++)\n {\n $g = $e[$x] + $e[$x2] + $e[$x3] + $e[$x4] + $e[$x5] + $e[$x6] + $e[$x7] + $e[$x8] + $e[$x9];\n $h = min($e[$x], $e[$x2], $e[$x3], $e[$x4], $e[$x5], $e[$x6], $e[$x7], $e[$x8], $e[$x9]);\n $i = max($e[$x], $e[$x2], $e[$x3], $e[$x4], $e[$x5], $e[$x6], $e[$x7], $e[$x8], $e[$x9]);\n $j = $i - $h;\n if(($g >= $b) && ($g <= $c) && ($j >= $d))\n {\n $f++;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n if($a > 9)\n {\n for($x = 0; $x < $a - 9; $x++)\n {\n for($x2 = $x + 1; $x2 < $a - 8; $x2++)\n {\n for($x3 = $x2 + 1; $x3 < $a - 7; $x3++)\n {\n for($x4 = $x3 + 1; $x4 < $a - 6; $x4++)\n {\n for($x5 = $x4 + 1; $x5 < $a - 5; $x5++)\n {\n for($x6 = $x5 + 1; $x6 < $a - 4; $x6++)\n {\n for($x7 = $x6 + 1; $x7 < $a - 3; $x7++)\n {\n for($x8 = $x7 + 1; $x8 < $a - 2; $x8++)\n {\n for($x9 = $x8 + 1; $x9 < $a - 1; $x9++)\n {\n for($x10 = $x9 + 1; $x10 < $a; $x10++)\n {\n $g = $e[$x] + $e[$x2] + $e[$x3] + $e[$x4] + $e[$x5] + $e[$x6] + $e[$x7] + $e[$x8] + $e[$x9] + $e[$x10];\n $h = min($e[$x], $e[$x2], $e[$x3], $e[$x4], $e[$x5], $e[$x6], $e[$x7], $e[$x8], $e[$x9], $e[$x10]);\n $i = max($e[$x], $e[$x2], $e[$x3], $e[$x4], $e[$x5], $e[$x6], $e[$x7], $e[$x8], $e[$x9], $e[$x10]);\n $j = $i - $h;\n if(($g >= $b) && ($g <= $c) && ($j >= $d))\n {\n $f++;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n if($a > 10)\n {\n for($x = 0; $x < $a - 10; $x++)\n {\n for($x2 = $x + 1; $x2 < $a - 9; $x2++)\n {\n for($x3 = $x2 + 1; $x3 < $a - 8; $x3++)\n {\n for($x4 = $x3 + 1; $x4 < $a - 7; $x4++)\n {\n for($x5 = $x4 + 1; $x5 < $a - 6; $x5++)\n {\n for($x6 = $x5 + 1; $x6 < $a - 5; $x6++)\n {\n for($x7 = $x6 + 1; $x7 < $a - 4; $x7++)\n {\n for($x8 = $x7 + 1; $x8 < $a - 3; $x8++)\n {\n for($x9 = $x8 + 1; $x9 < $a - 2; $x9++)\n {\n for($x10 = $x9 + 1; $x10 < $a - 1; $x10++)\n {\n for($x11 = $x10 + 1; $x11 < $a; $x11++)\n {\n $g = $e[$x] + $e[$x2] + $e[$x3] + $e[$x4] + $e[$x5] + $e[$x6] + $e[$x7] + $e[$x8] + $e[$x9] + $e[$x10] + $e[$x11];\n $h = min($e[$x], $e[$x2], $e[$x3], $e[$x4], $e[$x5], $e[$x6], $e[$x7], $e[$x8], $e[$x9], $e[$x10], $e[$x11]);\n $i = max($e[$x], $e[$x2], $e[$x3], $e[$x4], $e[$x5], $e[$x6], $e[$x7], $e[$x8], $e[$x9], $e[$x10], $e[$x11]);\n $j = $i - $h;\n if(($g >= $b) && ($g <= $c) && ($j >= $d))\n {\n $f++;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n if($a > 11)\n {\n for($x = 0; $x < $a - 11; $x++)\n {\n for($x2 = $x + 1; $x2 < $a - 10; $x2++)\n {\n for($x3 = $x2 + 1; $x3 < $a - 9; $x3++)\n {\n for($x4 = $x3 + 1; $x4 < $a - 8; $x4++)\n {\n for($x5 = $x4 + 1; $x5 < $a - 7; $x5++)\n {\n for($x6 = $x5 + 1; $x6 < $a - 6; $x6++)\n {\n for($x7 = $x6 + 1; $x7 < $a - 5; $x7++)\n {\n for($x8 = $x7 + 1; $x8 < $a - 4; $x8++)\n {\n for($x9 = $x8 + 1; $x9 < $a - 3; $x9++)\n {\n for($x10 = $x9 + 1; $x10 < $a - 2; $x10++)\n {\n for($x11 = $x10 + 1; $x11 < $a - 1; $x11++)\n {\n for($x12 = $x11 + 1; $x12 < $a; $x12++)\n {\n $g = $e[$x] + $e[$x2] + $e[$x3] + $e[$x4] + $e[$x5] + $e[$x6] + $e[$x7] + $e[$x8] + $e[$x9] + $e[$x10] + $e[$x11] + $e[$x12];\n $h = min($e[$x], $e[$x2], $e[$x3], $e[$x4], $e[$x5], $e[$x6], $e[$x7], $e[$x8], $e[$x9], $e[$x10], $e[$x11], $e[$x12]);\n $i = max($e[$x], $e[$x2], $e[$x3], $e[$x4], $e[$x5], $e[$x6], $e[$x7], $e[$x8], $e[$x9], $e[$x10], $e[$x11], $e[$x12]);\n $j = $i - $h;\n if(($g >= $b) && ($g <= $c) && ($j >= $d))\n {\n $f++;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n if($a > 12)\n {\n for($x = 0; $x < $a - 12; $x++)\n {\n for($x2 = $x + 1; $x2 < $a - 11; $x2++)\n {\n for($x3 = $x2 + 1; $x3 < $a - 10; $x3++)\n {\n for($x4 = $x3 + 1; $x4 < $a - 9; $x4++)\n {\n for($x5 = $x4 + 1; $x5 < $a - 8; $x5++)\n {\n for($x6 = $x5 + 1; $x6 < $a - 7; $x6++)\n {\n for($x7 = $x6 + 1; $x7 < $a - 6; $x7++)\n {\n for($x8 = $x7 + 1; $x8 < $a - 5; $x8++)\n {\n for($x9 = $x8 + 1; $x9 < $a - 4; $x9++)\n {\n for($x10 = $x9 + 1; $x10 < $a - 3; $x10++)\n {\n for($x11 = $x10 + 1; $x11 < $a - 2; $x11++)\n {\n for($x12 = $x11 + 1; $x12 < $a - 1; $x12++)\n {\n for($x13 = $x12 + 1; $x13 < $a; $x13++)\n {\n $g = $e[$x] + $e[$x2] + $e[$x3] + $e[$x4] + $e[$x5] + $e[$x6] + $e[$x7] + $e[$x8] + $e[$x9] + $e[$x10] + $e[$x11] + $e[$x12] + $e[$x13];\n $h = min($e[$x], $e[$x2], $e[$x3], $e[$x4], $e[$x5], $e[$x6], $e[$x7], $e[$x8], $e[$x9], $e[$x10], $e[$x11], $e[$x12], $e[$x13]);\n $i = max($e[$x], $e[$x2], $e[$x3], $e[$x4], $e[$x5], $e[$x6], $e[$x7], $e[$x8], $e[$x9], $e[$x10], $e[$x11], $e[$x12], $e[$x13]);\n $j = $i - $h;\n if(($g >= $b) && ($g <= $c) && ($j >= $d))\n {\n $f++;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n if($a > 13)\n {\n for($x = 0; $x < $a - 13; $x++)\n {\n for($x2 = $x + 1; $x2 < $a - 12; $x2++)\n {\n for($x3 = $x2 + 1; $x3 < $a - 11; $x3++)\n {\n for($x4 = $x3 + 1; $x4 < $a - 10; $x4++)\n {\n for($x5 = $x4 + 1; $x5 < $a - 9; $x5++)\n {\n for($x6 = $x5 + 1; $x6 < $a - 8; $x6++)\n {\n for($x7 = $x6 + 1; $x7 < $a - 7; $x7++)\n {\n for($x8 = $x7 + 1; $x8 < $a - 6; $x8++)\n {\n for($x9 = $x8 + 1; $x9 < $a - 5; $x9++)\n {\n for($x10 = $x9 + 1; $x10 < $a - 4; $x10++)\n {\n for($x11 = $x10 + 1; $x11 < $a - 3; $x11++)\n {\n for($x12 = $x11 + 1; $x12 < $a - 2; $x12++)\n {\n for($x13 = $x12 + 1; $x13 < $a - 1; $x13++)\n {\n for($x14 = $x13 + 1; $x14 < $a; $x14++)\n {\n $g = $e[$x] + $e[$x2] + $e[$x3] + $e[$x4] + $e[$x5] + $e[$x6] + $e[$x7] + $e[$x8] + $e[$x9] + $e[$x10] + $e[$x11] + $e[$x12] + $e[$x13] + $e[$x14];\n $h = min($e[$x], $e[$x2], $e[$x3], $e[$x4], $e[$x5], $e[$x6], $e[$x7], $e[$x8], $e[$x9], $e[$x10], $e[$x11], $e[$x12], $e[$x13], $e[$x14]);\n $i = max($e[$x], $e[$x2], $e[$x3], $e[$x4], $e[$x5], $e[$x6], $e[$x7], $e[$x8], $e[$x9], $e[$x10], $e[$x11], $e[$x12], $e[$x13], $e[$x14]);\n $j = $i - $h;\n if(($g >= $b) && ($g <= $c) && ($j >= $d))\n {\n $f++;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n if($a > 14)\n {\n for($x = 0; $x < $a - 14; $x++)\n {\n for($x2 = $x + 1; $x2 < $a - 13; $x2++)\n {\n for($x3 = $x2 + 1; $x3 < $a - 12; $x3++)\n {\n for($x4 = $x3 + 1; $x4 < $a - 11; $x4++)\n {\n for($x5 = $x4 + 1; $x5 < $a - 10; $x5++)\n {\n for($x6 = $x5 + 1; $x6 < $a - 9; $x6++)\n {\n for($x7 = $x6 + 1; $x7 < $a - 8; $x7++)\n {\n for($x8 = $x7 + 1; $x8 < $a - 7; $x8++)\n {\n for($x9 = $x8 + 1; $x9 < $a - 6; $x9++)\n {\n for($x10 = $x9 + 1; $x10 < $a - 5; $x10++)\n {\n for($x11 = $x10 + 1; $x11 < $a - 4; $x11++)\n {\n for($x12 = $x11 + 1; $x12 < $a - 3; $x12++)\n {\n for($x13 = $x12 + 1; $x13 < $a - 2; $x13++)\n {\n for($x14 = $x13 + 1; $x14 < $a - 1; $x14++)\n {\n for($x15 = $x14 + 1; $x15 < $a; $x15++)\n {\n $g = $e[$x] + $e[$x2] + $e[$x3] + $e[$x4] + $e[$x5] + $e[$x6] + $e[$x7] + $e[$x8] + $e[$x9] + $e[$x10] + $e[$x11] + $e[$x12] + $e[$x13] + $e[$x14] + $e[$x15];\n $h = min($e[$x], $e[$x2], $e[$x3], $e[$x4], $e[$x5], $e[$x6], $e[$x7], $e[$x8], $e[$x9], $e[$x10], $e[$x11], $e[$x12], $e[$x13], $e[$x14], $e[$x15]);\n $i = max($e[$x], $e[$x2], $e[$x3], $e[$x4], $e[$x5], $e[$x6], $e[$x7], $e[$x8], $e[$x9], $e[$x10], $e[$x11], $e[$x12], $e[$x13], $e[$x14], $e[$x15]);\n $j = $i - $h;\n if(($g >= $b) && ($g <= $c) && ($j >= $d))\n {\n $f++;\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n print $f;\n }\n else\n {\n print $f;\n }\n }\n else\n {\n print $f;\n }\n }\n else\n {\n print $f;\n }\n }\n else\n {\n print $f;\n }\n }\n else\n {\n print $f;\n }\n }\n else\n {\n print $f;\n }\n }\n else\n {\n print $f;\n }\n }\n else\n {\n print $f;\n }\n }\n else\n {\n print $f;\n }\n }\n else\n {\n print $f;\n }\n }\n else\n {\n print $f;\n }\n }\n else\n {\n print $f;\n }\n }\n else\n {\n print $f;\n }\n}\nelse\n{\n print $f;\n}\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "50e15fd623abda89d429e9f7f196dd48", "src_uid": "0d43104a0de924cdcf8e4aced5aa825d", "difficulty": 1400.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "228d647dc967377b7b26b25adc7de06f", "src_uid": "d5e66e34601cad6d78c3f02898fa09f4", "difficulty": 800.0} {"lang": "PHP", "source_code": " $d)\n {\n array_push($e, $y - $x);\n break;\n }\n }\n}\nrsort($e);\nprint $e[0];\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "3c6c20641a39f6396e31224f1fc1d31a", "src_uid": "086d07bd6f9031df09bd6a6e8fe8f25c", "difficulty": 1400.0} {"lang": "PHP", "source_code": " $d)\n {\n array_push($e, $y - $x + 1);\n break;\n }\n }\n}\nrsort($e);\nprint $e[0];\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "b2092e84b7738f89af453e095c88d13a", "src_uid": "086d07bd6f9031df09bd6a6e8fe8f25c", "difficulty": 1400.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "eaef135239ca8a2a06d7b35a7d9b3e9a", "src_uid": "556684d96d78264ad07c0cdd3b784bc9", "difficulty": 900.0} {"lang": "PHP", "source_code": "\n", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "b4e4f991d16057dde4cbbeeb5c8f02f8", "src_uid": "2896aadda9e7a317d33315f91d1ca64d", "difficulty": 900.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "62181db9023e0f965d90debcf5eec20e", "src_uid": "af07223819aeb5bd6ded4340c472b2b6", "difficulty": 1000.0} {"lang": "PHP", "source_code": " 0) {\r\n $ans = $t == 4 ? 2 : 1;\r\n \r\n } else {\r\n $ans = 0;\r\n }\r\n \r\n \r\n \r\n \r\n IO::pr($ans);\r\n \r\n}\r\n \r\n \r\nclass IO {\r\n public static function get()\r\n {\r\n return trim(fgets(STDIN));\r\n }\r\n \r\n public static function getArray()\r\n {\r\n return explode(' ', trim(fgets(STDIN)));\r\n }\r\n public static function pr($s)\r\n {\r\n echo $s, PHP_EOL;\r\n }\r\n public static function prArray($s)\r\n {\r\n echo implode( ' ', $s), PHP_EOL;\r\n }\r\n public static function getMinValue($x, $y) {\r\n return $x > $y ? $y : $x;\r\n }\r\n public static function getMaxValue($x, $y) {\r\n return $x > $y ? $x : $y;\r\n }\r\n}", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "53e6d40240e8a09bf33a9a4ed5de9360", "src_uid": "7336b8becd2438f0439240ee8f9610ec", "difficulty": 800.0} {"lang": "PHP", "source_code": " $b)\n {\n $j = 1;\n print $x;\n break;\n }\n }\n if($j == 0)\n {\n print count($h);\n }\n}\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "e2f15aae9454e080cc54eed7c35c9685", "src_uid": "b3f8e769ee7719ea5c9f458428b16a4e", "difficulty": 1200.0} {"lang": "PHP", "source_code": "= $b)\n{\n print \"0\";\n}\nelseif($c <= $d)\n{\n print \"-1\";\n}\nelseif($c > $d)\n{\n while(TRUE)\n {\n $a -= $d * 12;\n $a += $c * 12;\n $e++;\n if($a >= $b)\n {\n break;\n }\n }\n print $e;\n}\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "47235c9d1fe54af868b6cb671773a25c", "src_uid": "2c39638f07c3d789ba4c323a205487d7", "difficulty": 1400.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "d44ce478b954076bd749fc48bf538283", "src_uid": "18644c9df41b9960594fdca27f1d2fec", "difficulty": 1600.0} {"lang": "PHP", "source_code": " $a))\n {\n print $x;\n break;\n }\n $c++;\n }\n}\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "c694b60a6119c33355de18ebb7771d4d", "src_uid": "18644c9df41b9960594fdca27f1d2fec", "difficulty": 1600.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "a6f4397b0aaf64036e2555fb96567de2", "src_uid": "51b1c216948663fff721c28d131bf18f", "difficulty": 1400.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "47d73cff2b87ade183e730fb28599ad1", "src_uid": "fc5765b9bd18dc7555fa76e91530c036", "difficulty": 1100.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "ee9a1776acf0ede8a668368a41e6a9ee", "src_uid": "4e652ccb40632bf4b9dd95b9f8ae1ec9", "difficulty": 1200.0} {"lang": "PHP", "source_code": " ", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "8f6ef596ee69336f979a5c9797c4d305", "src_uid": "0515ac888937a4dda30cad5e2383164f", "difficulty": 1000.0} {"lang": "PHP", "source_code": "0||$c<1&&$d>0?\"Ron\\n\":\"Hermione\\n\");\n?>\n\n\n", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "3de4a44254950d7116fa6ba7405f4cd4", "src_uid": "44d608de3e1447f89070e707ba550150", "difficulty": 1800.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "c13b9f0db00b63631eef51cc59d5663e", "src_uid": "5c000b4c82a8ecef764f53fda8cee541", "difficulty": 1400.0} {"lang": "PHP", "source_code": "", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "fbfeec3f0b60a98190f8cbbda77d451a", "src_uid": "91c9dbbceb467d5fd420e92c2919ecb6", "difficulty": 1100.0} {"lang": "PHP", "source_code": "= 4)\n{\n $c = $b[0];\n $d = $b[1];\n $e = $b[$a - 2];\n $f = $b[$a - 1];\n unset($b[0]);\n unset($b[1]);\n unset($b[$a - 2]);\n unset($b[$a - 1]);\n print $f . \" \" . $d . \" \" . implode(\" \", $b) . \" \" . $e . \" \" . $c;\n}\n?>", "lang_cluster": "PHP", "compilation_error": false, "code_uid": "db7a9c57ae04b8a94a304fc038f1d373", "src_uid": "4408eba2c5c0693e6b70bdcbe2dda2f4", "difficulty": 1300.0}