原创 poj 1066 Treasure Hunt
http://poj.org/problem?id=1066 這道直接暴力枚舉每個分割的小線段的中點,然後與寶藏的那個點相連,然後判斷與此線段相交的線段數,求出最小就行。 #include <cstdio> #include <cstri
原创 CookieLocaleResolver
This locale resolver inspects a Cookie that might exist on the client to see if a Locale or TimeZoneis specified. If s
原创 ural 1019 Line Painting
http://acm.timus.ru/problem.aspx?space=1&num=1019 #include <cstdio> #include <cstring> #include <algorithm> #define ma
原创 spring xml Collections
In the <list/>, <set/>, <map/>, and <props/> elements, you set the properties and arguments of the Java Collect
原创 ural 1353. Milliard Vasya's Function
這道題就是求從1到10^9中個位數字之和爲s的數的個數。 #include <cstdio> #include <cstring> #include <algorithm> using namespace std; int dp[10]
原创 poj 3277 Mountains
http://poj.org/problem?id=3227 這道題題意就是求登山遠望,看到山表面的長度。通過比較點所在直線的斜率來判斷線段是不是可以被看到。 #include <cstdio> #include <cstring> #i
原创 spring URI Template Patterns
In Spring MVC you can use the @PathVariable annotation on a method argument to bind it to the value of a URI template v
原创 spring 配置文件引用
You can use the application context constructor to load bean definitions from all these XML fragments. This onst
原创 poj 1151 Atlantis
http://poj.org/problem?id=1151 這道題就是給你一些矩形的左上角和右下角的座標,這些矩形可能有重疊,求這些矩形覆蓋的面積。先把x座標和y座標分別離散化。然後再求面積。 #include <cstdio> #i
原创 hdu 1754 I Hate It
http://acm.hdu.edu.cn/showproblem.php?pid=1754 這道題就是一道水題,求區間內的最大值。 #include <cstdio> #include <cstring> #include <algor
原创 hdu 1559 最大子矩陣
http://acm.hdu.edu.cn/showproblem.php?pid=1559 #include <cstdio> #include <cstring> #include <algorithm> #define maxn 1