摘要: 链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2533三个方向, 横,竖,对角线~ 1 #include 2 #include 3 using namespace std; 4 5 int main() 6 { 7 long long int n,m; 8 while(scanf("%lld%lld",&n,&m)!=EOF&&n&&m) 9 {10 if 阅读全文
posted @ 2013-07-22 17:15 淡墨æ末央 阅读(646) 评论(0) 推荐(0) 编辑
摘要: 链接: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2127题意: 圆心在原点,半径为 R 的圆,其边上有 N 个点, 任意三点组成一个三角形, 求三角形面积和~思路: 利用叉积求面积~暴力求三角形~ 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 const double Pi=acos(-1); 8 const 阅读全文
posted @ 2013-07-22 11:31 淡墨æ末央 阅读(322) 评论(0) 推荐(0) 编辑
摘要: 链接:http://poj.org/problem?id=2507题意:哪个直角三角形,一直角边重合, 斜边分别为 X, Y, 两斜边交点高为 C , 求重合的直角边长度~思路: 设两个三角形不重合的两条直角边长为 a , b,根据 三角形相似, 则有 1/a + 1/b =1/c, 二分枚举答案得之~ 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 double x, y, c; 8 const double eps=1e-8; 9 double get( double ... 阅读全文
posted @ 2013-07-22 10:18 淡墨æ末央 阅读(216) 评论(0) 推荐(0) 编辑