摘要: http://poj.org/problem?id=3273View Code 1 #include <iostream> 2 #include<cstdio> 3 #include<cstring> 4 #include<stdlib.h> 5 #include<cmath> 6 using namespace std; 7 int num[100010],n,m; 8 int judge(int mid) 9 {10 int i,s=0,k=1;11 for(i = 1 ; i <= n ; i++)12 {13 s+=nu 阅读全文
posted @ 2013-02-26 19:25 _雨 阅读(180) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=3122View Code 1 #include <iostream> 2 #include<cstdio> 3 #include<cstring> 4 #include<stdlib.h> 5 #include<cmath> 6 #define eps 1e-8 7 #define pi 3.14159265359//精度高一点 6位错了一次 8 using namespace std; 9 int main()10 {11 int i,j,n,f,t;12 double r[10 阅读全文
posted @ 2013-02-26 19:23 _雨 阅读(128) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=3258View Code 1 #include <iostream> 2 #include<cstdio> 3 #include<cstring> 4 #include<stdlib.h> 5 #include<cmath> 6 #include<algorithm> 7 using namespace std; 8 int st[50010],di[50010],n,m; 9 int judge(int mi)10 {11 int i,k=0,s=0;12 for(i 阅读全文
posted @ 2013-02-26 19:21 _雨 阅读(179) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=1905View Code 1 /* 2 (1) 角度→弧度公式 θr = 1/2*s 3 4 (2) 三角函数公式 sinθ= 1/2*L/r 5 6 (3) 勾股定理 r^2 – ( r – h)^2 = (1/2*L)^2 7 整理得 8 9 r = (4*h*h+l*l)/(8*h)10 s = 2rarsin(l/(2*r))11 12 逆向思维解二元方程组:13 14 要求(1)式的h,唯有先求r15 16 但是由于(2)式是三角函数式,直接求r比较困难17 18 因此要用顺向... 阅读全文
posted @ 2013-02-26 19:20 _雨 阅读(148) 评论(0) 推荐(0) 编辑