锘??xml version="1.0" encoding="utf-8" standalone="yes"?>久久久久九国产精品,狠狠精品干练久久久无码中文字幕,香港aa三级久久三级http://www.shnenglu.com/huicpc0860/category/13814.htmlEverything has its history.zh-cnTue, 10 Aug 2010 15:02:49 GMTTue, 10 Aug 2010 15:02:49 GMT60hdu 2993 MAX Average Problemhttp://www.shnenglu.com/huicpc0860/archive/2010/08/09/122835.htmlhuicpc0860huicpc0860Mon, 09 Aug 2010 12:24:00 GMThttp://www.shnenglu.com/huicpc0860/archive/2010/08/09/122835.htmlhttp://www.shnenglu.com/huicpc0860/comments/122835.htmlhttp://www.shnenglu.com/huicpc0860/archive/2010/08/09/122835.html#Feedback0http://www.shnenglu.com/huicpc0860/comments/commentRss/122835.htmlhttp://www.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);
    }
}


huicpc0860 2010-08-09 20:24 鍙戣〃璇勮
]]>
poj 1133 starshttp://www.shnenglu.com/huicpc0860/archive/2010/08/01/121895.htmlhuicpc0860huicpc0860Sun, 01 Aug 2010 12:05:00 GMThttp://www.shnenglu.com/huicpc0860/archive/2010/08/01/121895.htmlhttp://www.shnenglu.com/huicpc0860/comments/121895.htmlhttp://www.shnenglu.com/huicpc0860/archive/2010/08/01/121895.html#Feedback0http://www.shnenglu.com/huicpc0860/comments/commentRss/121895.htmlhttp://www.shnenglu.com/huicpc0860/services/trackbacks/121895.html闃呰鍏ㄦ枃

huicpc0860 2010-08-01 20:05 鍙戣〃璇勮
]]>
poj 1271 Nice Milkhttp://www.shnenglu.com/huicpc0860/archive/2010/07/27/121412.htmlhuicpc0860huicpc0860Tue, 27 Jul 2010 10:46:00 GMThttp://www.shnenglu.com/huicpc0860/archive/2010/07/27/121412.htmlhttp://www.shnenglu.com/huicpc0860/comments/121412.htmlhttp://www.shnenglu.com/huicpc0860/archive/2010/07/27/121412.html#Feedback0http://www.shnenglu.com/huicpc0860/comments/commentRss/121412.htmlhttp://www.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;
}


huicpc0860 2010-07-27 18:46 鍙戣〃璇勮
]]>
poj 3347 Kadj Squareshttp://www.shnenglu.com/huicpc0860/archive/2010/07/23/121134.htmlhuicpc0860huicpc0860Fri, 23 Jul 2010 10:51:00 GMThttp://www.shnenglu.com/huicpc0860/archive/2010/07/23/121134.htmlhttp://www.shnenglu.com/huicpc0860/comments/121134.htmlhttp://www.shnenglu.com/huicpc0860/archive/2010/07/23/121134.html#Feedback0http://www.shnenglu.com/huicpc0860/comments/commentRss/121134.htmlhttp://www.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(
"");
    }
}



huicpc0860 2010-07-23 18:51 鍙戣〃璇勮
]]>
hdu 3437 Gardenhttp://www.shnenglu.com/huicpc0860/archive/2010/07/14/120383.htmlhuicpc0860huicpc0860Wed, 14 Jul 2010 13:39:00 GMThttp://www.shnenglu.com/huicpc0860/archive/2010/07/14/120383.htmlhttp://www.shnenglu.com/huicpc0860/comments/120383.htmlhttp://www.shnenglu.com/huicpc0860/archive/2010/07/14/120383.html#Feedback0http://www.shnenglu.com/huicpc0860/comments/commentRss/120383.htmlhttp://www.shnenglu.com/huicpc0860/services/trackbacks/120383.html闃呰鍏ㄦ枃

huicpc0860 2010-07-14 21:39 鍙戣〃璇勮
]]>
poj 1228 Grandpa's Estatehttp://www.shnenglu.com/huicpc0860/archive/2010/05/15/115468.htmlhuicpc0860huicpc0860Sat, 15 May 2010 13:07:00 GMThttp://www.shnenglu.com/huicpc0860/archive/2010/05/15/115468.htmlhttp://www.shnenglu.com/huicpc0860/comments/115468.htmlhttp://www.shnenglu.com/huicpc0860/archive/2010/05/15/115468.html#Feedback0http://www.shnenglu.com/huicpc0860/comments/commentRss/115468.htmlhttp://www.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;
}



huicpc0860 2010-05-15 21:07 鍙戣〃璇勮
]]>
欧美一区二区久久精品| 久久亚洲欧洲国产综合| 中文国产成人精品久久亚洲精品AⅤ无码精品 | 亚洲伊人久久成综合人影院 | 蜜桃麻豆www久久| 亚洲午夜精品久久久久久人妖| 91久久成人免费| 99久久精品免费看国产免费| 91亚洲国产成人久久精品| 久久国产成人| 77777亚洲午夜久久多人| 亚洲精品乱码久久久久66| 久久精品国产亚洲精品2020| 国产精品免费看久久久香蕉| 久久激情五月丁香伊人| 久久综合狠狠综合久久| 国内精品伊人久久久久网站| 人妻无码αv中文字幕久久 | 午夜精品久久久久久| 亚洲中文字幕无码久久2020| 国产精品成人无码久久久久久 | 久久er国产精品免费观看2| 久久精品9988| 欧美日韩精品久久免费| 亚洲综合久久综合激情久久| 久久久久亚洲精品日久生情 | 久久久久se色偷偷亚洲精品av | 久久亚洲精品人成综合网| 久久国产三级无码一区二区| 久久久av波多野一区二区| 一本色道久久综合| 亚洲а∨天堂久久精品| 99久久精品久久久久久清纯| 精品久久久久久久无码| 亚洲国产精品无码久久SM| 一本色道久久88精品综合| 色综合久久综合中文综合网| 亚洲香蕉网久久综合影视| 浪潮AV色综合久久天堂| 精品久久久噜噜噜久久久| 国产精品久久久久久福利漫画|