Please Login First!"; exit(1); }?> ",$descriptionHTML); $descriptionHTML=str_replace('\\\\','\\',$descriptionHTML); $descriptionHTML=str_replace('\\"','"',$descriptionHTML); return ($descriptionHTML); } $url=$_POST ['url']; if (!$url) $url=$_GET['url']; if (strpos($url, "http") === false){ echo "Please Input like http://ybt.ssoier.cn:8088/problem_show.php?pid=1000 "; exit(1); } $remote_id=mb_substr($url,mb_strpos($url,"=")+1); if (false) { $url = stripslashes ( $url); } $baseurl=substr($url,0,strrpos($url,"/")+1); // echo $baseurl; $html = file_get_html($url, false,null,0, -1,true,true, DEFAULT_TARGET_CHARSET,false); foreach($html->find('img') as $element) $element->src=$baseurl.$element->src; $element=$html->find('h3',0); $title=$element->plaintext; $title=mb_substr($title,mb_strlen($remote_id.":")); $i=1; $sample_output=$sample_input=$descriptionHTML=""; $html=$html->innertext; $html=mb_ereg_replace("\pshow\(\"","",$html); $html=mb_ereg_replace("\"\);\<\/script\>","",$html); // echo $i."-".strlen($html); if(strpos($html,"
")>0){ $descriptionHTML=getPartByMark($html,"
","

"); }else{ $descriptionHTML=getPartByMark($html,"【题目描述】","

【输入】","

【输出】

"); $inputHTML=mb_ereg_replace("\\\\n","\n
",$inputHTML); $outputHTML=getPartByMark($descriptionHTML,"

【输出】

","

【输入样例】

"); $outputHTML=mb_ereg_replace("\\\\n","\n
",$outputHTML); $sample_input=getPartByMark($descriptionHTML,"【输入样例】\n
","
"); $sample_output=getPartByMark($descriptionHTML,"【输出样例】\n
","
"); $descriptionHTML=getPartByMark($descriptionHTML,"【题目描述】","

【输入】

"); $descriptionHTML=mb_ereg_replace("\\\\n","\n
",$descriptionHTML); ?>

Title:

Time Limit:S Memory Limit:MByte

Description:

Input: Output:
Sample Input: Sample Output:
Test Input: Test Output:
Hint:

SpecialJudge: NY

Source:

contest: