锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久久久九国产精品,狠狠精品干练久久久无码中文字幕,香港aa三级久久三级 http://m.shnenglu.com/huicpc0860/category/13814.htmlEverything has its history. zh-cn Tue, 10 Aug 2010 15:02:49 GMT Tue, 10 Aug 2010 15:02:49 GMT 60 hdu 2993 MAX Average Problem http://m.shnenglu.com/huicpc0860/archive/2010/08/09/122835.htmlhuicpc0860 huicpc0860 Mon, 09 Aug 2010 12:24:00 GMT http://m.shnenglu.com/huicpc0860/archive/2010/08/09/122835.html http://m.shnenglu.com/huicpc0860/comments/122835.html http://m.shnenglu.com/huicpc0860/archive/2010/08/09/122835.html#Feedback 0 http://m.shnenglu.com/huicpc0860/comments/commentRss/122835.html http://m.shnenglu.com/huicpc0860/services/trackbacks/122835.html #include < stdio.h > using namespace std; #define N 100010 #define max(x,y) ((x)>(y)?(x):(y)) typedef long long LL; int s[N]; struct point { int x, y; point(){} point( int x, int y):x(x),y(y){} }p[N]; point operator - ( const point & a, const point & b) { return point(a.x - b.x, a.y - b.y); } LL operator ^ ( const point & a, const point & b) { return (LL)a.x * b.y - (LL)a.y * b.x; } inline int get (){ int s = 0 ; char c; while (c = getchar(),c != ' ' && c != ' \n ' )s = s * 10 + c - ' 0 ' ; return s; } int main() { int n,k; s[ 0 ] = 0 ; while ( ~ scanf( " %d " , & n)){ k = get ();n ++ ; for ( int i = 1 ;i < n; ++ i){ s[i] = get (); s[i] += s[i - 1 ]; } double ans = 0 ; for ( int i = k,m =- 1 ,f = 0 ;i < n; ++ i){ point now(i - k,s[i - k]); while (f < m && (p[m] - p[m - 1 ] ^ now - p[m - 1 ]) < 0 ) -- m; p[ ++ m] = now; while (f < m && (LL)(s[i] - p[f].y) * (i - p[f + 1 ].x) < (LL)(s[i] - p[f + 1 ].y) * (i - p[f].x))f ++ ; ans = max(ans, double (s[i] - p[f].y) / (i - p[f].x)); } printf( " %.2lf\n " ,ans); } } ]]>poj 1133 stars http://m.shnenglu.com/huicpc0860/archive/2010/08/01/121895.htmlhuicpc0860 huicpc0860 Sun, 01 Aug 2010 12:05:00 GMT http://m.shnenglu.com/huicpc0860/archive/2010/08/01/121895.html http://m.shnenglu.com/huicpc0860/comments/121895.html http://m.shnenglu.com/huicpc0860/archive/2010/08/01/121895.html#Feedback 0 http://m.shnenglu.com/huicpc0860/comments/commentRss/121895.html http://m.shnenglu.com/huicpc0860/services/trackbacks/121895.html 闃呰鍏ㄦ枃 ]]> poj 1271 Nice Milk http://m.shnenglu.com/huicpc0860/archive/2010/07/27/121412.htmlhuicpc0860 huicpc0860 Tue, 27 Jul 2010 10:46:00 GMT http://m.shnenglu.com/huicpc0860/archive/2010/07/27/121412.html http://m.shnenglu.com/huicpc0860/comments/121412.html http://m.shnenglu.com/huicpc0860/archive/2010/07/27/121412.html#Feedback 0 http://m.shnenglu.com/huicpc0860/comments/commentRss/121412.html http://m.shnenglu.com/huicpc0860/services/trackbacks/121412.html #include < stdio.h > #include < math.h > #include < algorithm > using namespace std; const double eps = 1e - 8 ; double h,ans,cake; struct point { double x,y; point () {} point (double x, double y):x(x),y(y) {} void get () {scanf( " %lf%lf " , & x, & y);} }; struct poly { point p[ 21 ]; int n; void get () { for ( int i = 0 ;i < n;i ++ )p[i]. get ();p[n] = p[ 0 ];} }sg; int dcmp( double x) { return (x > eps) - (x <- eps); } double cross(point o,point p,point q) { return (p.x - o.x) * (q.y - o.y) - (p.y - o.y) * (q.x - o.x); } point lineinter(point a,point b,point c,point d){ double u = cross(a,b,c),v = cross(b,a,d); return point((c.x * v + d.x * u) / (u + v),(c.y * v + d.y * u) / (u + v)); } double dis(point a,point b) { return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y)); } void push(point a,point b,point & c,point & d) { double x = a.y - b.y,y = b.x - a.x,t = h / dis(a,b); c = point(a.x + x * t,a.y + y * t); d = point(b.x + x * t,b.y + y * t); } void cut(point a,point b,poly tg,poly & g) { push(a,b,a,b); g.n = 0 ; for ( int i = 0 ;i < tg.n;i ++ ) { int u = dcmp(cross(a,b,tg.p[i])),v = dcmp(cross(a,b,tg.p[i + 1 ])); if (u >= 0 )g.p[g.n ++ ] = tg.p[i]; if (u * v < 0 ) g.p[g.n ++ ] = lineinter(a,b,tg.p[i],tg.p[i + 1 ]); } g.p[g.n]= g.p[ 0 ]; } double area(poly g) { double sum = 0 ; for ( int i = 2 ;i < g.n;i ++ ) sum += cross(g.p[ 0 ],g.p[i - 1 ],g.p[i]); return 0.5 * sum; } void dfs( int i, int step,poly g) { if (step + i < sg.n)dfs(i + 1 ,step,g); cut(sg.p[i],sg.p[i + 1 ],g,g); if (step == 1 )ans = max(ans,cake - area(g)); else dfs(i + 1 ,step - 1 ,g); } int main() { int k; while (scanf( " %d%d%lf " , & sg.n, & k, & h),sg.n || k || h) { sg. get (); cake = area(sg); ans = 0 ; k = min(k,sg.n); if (k && h)dfs( 0 ,k,sg); printf( " %.2lf\n " ,ans); } return 0 ; }
]]>poj 3347 Kadj Squares http://m.shnenglu.com/huicpc0860/archive/2010/07/23/121134.htmlhuicpc0860 huicpc0860 Fri, 23 Jul 2010 10:51:00 GMT http://m.shnenglu.com/huicpc0860/archive/2010/07/23/121134.html http://m.shnenglu.com/huicpc0860/comments/121134.html http://m.shnenglu.com/huicpc0860/archive/2010/07/23/121134.html#Feedback 0 http://m.shnenglu.com/huicpc0860/comments/commentRss/121134.html http://m.shnenglu.com/huicpc0860/services/trackbacks/121134.html #include < stdio.h > #include < math.h > #define max(a,b) (a>b?a:b) int n; struct seg { double l, r, t; } a[ 50 ]; int main() { while (scanf( " %d " , & n), n) { for ( int i = 0 ; i < n; i ++ ) { scanf( " %lf " , & a[i].t); a[i].l = 0.0 ; for ( int j = 0 ; j < i; j ++ ) a[i].l = max(a[i].l, a[j].r - fabs(a[i].t - a[j].t) / 2 ); a[i].r = a[i].l + a[i].t; } for ( int i = 1 ; i < n; i ++ ) for ( int j = 0 ; j < i; j ++ ) if (a[i].l < a[i].r) { if (a[i].t > a[j].t && a[i].l < a[j].r) a[j].r = a[i].l; else if (a[i].t < a[j].t && a[j].r > a[i].l) a[i].l = a[j].r; } for ( int i = 0 ; i < n; i ++ ) if (a[i].l < a[i].r)printf( " %d " , i + 1 ); puts( "" ); } }
]]>hdu 3437 Garden http://m.shnenglu.com/huicpc0860/archive/2010/07/14/120383.htmlhuicpc0860 huicpc0860 Wed, 14 Jul 2010 13:39:00 GMT http://m.shnenglu.com/huicpc0860/archive/2010/07/14/120383.html http://m.shnenglu.com/huicpc0860/comments/120383.html http://m.shnenglu.com/huicpc0860/archive/2010/07/14/120383.html#Feedback 0 http://m.shnenglu.com/huicpc0860/comments/commentRss/120383.html http://m.shnenglu.com/huicpc0860/services/trackbacks/120383.html 闃呰鍏ㄦ枃 ]]> poj 1228 Grandpa's Estate http://m.shnenglu.com/huicpc0860/archive/2010/05/15/115468.htmlhuicpc0860 huicpc0860 Sat, 15 May 2010 13:07:00 GMT http://m.shnenglu.com/huicpc0860/archive/2010/05/15/115468.html http://m.shnenglu.com/huicpc0860/comments/115468.html http://m.shnenglu.com/huicpc0860/archive/2010/05/15/115468.html#Feedback 0 http://m.shnenglu.com/huicpc0860/comments/commentRss/115468.html http://m.shnenglu.com/huicpc0860/services/trackbacks/115468.html #include < stdio.h > #include < algorithm > using namespace std; struct point { int x, y; }; bool cmp(point p1, point p2) { return p1.y < p2.y || p1.y == p2.y && p1.x < p2.x; } int cross(point p0, point p1, point p2) { return (p1.x - p0.x) * (p2.y - p0.y) - (p1.y - p0.y) * (p2.x - p0.x); } void tubao(point * p, int n, point * ch, int & m) { int i, k; sort(p, p + n, cmp); for (m = i = 0 ; i < n; i ++ ) { while (m > 1 && cross(ch[m - 2 ], ch[m - 1 ], p[i]) < 0 )m -- ; ch[m ++ ] = p[i]; } if (n = m) return ; k = m; for (i = n - 2 ; i >= 0 ; i -- ) { while (m > k && cross(ch[m - 2 ], ch[m - 1 ], p[i]) < 0 )m -- ; ch[m ++ ] = p[i]; } if (n > 1 )m -- ; } bool judge(point * p, int n) { if (n < 6 ) return 0 ; for ( int i = 2 ; i < n; i ++ ) if (cross(p[ 0 ], p[ 1 ], p[i]) != 0 ) return 1 ; return 0 ; } int main() { point p[ 1010 ], ch[ 1010 ]; int t, n; scanf( " %d " , & t); while (t -- ) { scanf( " %d " , & n); for ( int i = 0 ; i < n; i ++ ) scanf( " %d%d " , & p[i].x, & p[i].y); bool flag = judge(p, n); if (flag) { tubao(p, n, ch, n); ch[n] = ch[ 0 ]; point a, b; for ( int i = 1 ; flag && i < n;) { a = ch[i - 1 ], b = ch[i ++ ]; flag = 0 ; while (i <= n && cross(a, b, ch[i]) == 0 ) { flag = 1 ; i ++ ; } } } puts(flag ? " YES " : " NO " ); } return 0 ; }
]]>
久久久无码精品午夜 |
国产成人无码精品久久久性色 |
久久久久久亚洲精品成人
|
色偷偷偷久久伊人大杳蕉 |
国产精品美女久久久m |
香蕉久久夜色精品国产小说 |
久久久久九国产精品 |
亚洲av伊人久久综合密臀性色 |
韩国免费A级毛片久久 |
午夜精品久久久久成人 |
婷婷久久久亚洲欧洲日产国码AV |
成人a毛片久久免费播放 |
日韩美女18网站久久精品 |
99re这里只有精品热久久 |
中文字幕无码久久人妻 |
欧美精品一区二区精品久久 |
欧美成人免费观看久久 |
俺来也俺去啦久久综合网 |
久久精品一区二区三区AV |
久久综合九色综合久99 |
久久国产劲爆AV内射—百度 |
精品熟女少妇aⅴ免费久久 |
国产精品免费福利久久 |
色8久久人人97超碰香蕉987 |
国产精品99久久久久久宅男小说 |
久久99精品久久久久久不卡 |
72种姿势欧美久久久久大黄蕉 |
亚洲AV无码一区东京热久久 |
国产香蕉久久精品综合网 |
久久青青国产 |
无码8090精品久久一区 |
国产亚州精品女人久久久久久 |
久久久青草青青亚洲国产免观 |
996久久国产精品线观看 |
7777久久亚洲中文字幕 |
丁香五月网久久综合 |
久久精品欧美日韩精品 |
久久精品无码专区免费东京热 |
综合久久国产九一剧情麻豆 |
久久久久久亚洲精品成人 |
国产99精品久久 |