STD fourth Field 1001 1002 1004

Source: Internet
Author: User

HDU 5327 5328 5335

#include <stdio.h> #include <iostream> #include <string.h> #include <stack> #include < algorithm> #include <queue> #include <map> #include <cmath> #define EPS 0.00000001#define pi acos (- 1,0)//#define PR 999983using namespace Std;int a[100100]={0},b[20]={0};void init () {for    (int i=1; i<100000; i++) c1/>{        int z=0,k=i;        while (k>0)        {            b[z]=k%10;            K=K/10;            z++;        }        Sort (b,b+z);        int f=1;        for (int j=1; j<z; j + +)            if (b[j]==b[j-1]) f=0;        a[i]=a[i-1]+f;//        printf ("a[%d]=%d\n", I,a[i]);    }    return;} int main () {    int T;    Init ();    scanf ("%d", &t);    while (t--)    {        int l,r;        scanf ("%d%d", &l,&r);        printf ("%d\n", A[r]-a[l-1]);    }    return 0;}
 
#include <stdio.h> #include <iostream> #include <string.h> #include <stack> #include <   algorithm> #include <queue> #include <map> #include <cmath> #define EPS 0.00000001#define dbl_min 2.2250738585072014e-308 */min Positive value */#define PI ACOs ( -1,0)//#define PR 999983using namespace Std;int a[1000100]    = {0};d ouble b[1000100]= {0};int n,_max;int main () {int T;    scanf ("%d", &t);    A[0]= 0x80000000;    B[0]=dbl_min;        while (t--) {double x, y;        int SC,SJ;        scanf ("%d", &n);        scanf ("%lf", &x);        Sc=1;        Sj=1;        _max=0x80000000;            for (int i=1; i<n; i++) {scanf ("%lf", &y);            A[i]=y-x;            b[i]=y/x*1.0;            X=y;            if (A[i]==a[i-1]) {sc++;                } else {if (Sc>_max) _MAX=SC;            Sc=1; } if (b[i]-b[i-1]<0.0000001 && b[i-1]-b[i]<0.0000001) sj++;                else {if (Sj>_max) _MAX=SJ;            Sj=1;            }} if (N==1) {printf ("1\n");        Continue        }//for (int i=1;i<n;i++)//printf ("i=%d a[i]=%d b[i]=%f\n", I,a[i],b[i]);        if (Sc>_max) _MAX=SC;        if (Sj>_max) _MAX=SJ;    printf ("%d\n", _max+1); } return 0;}

#pragma COMMENT (linker, "/stack:1024000000,1024000000") #include <stdio.h> #include <iostream> #include <string.h> #include <stack> #include <algorithm> #include <queue> #include <map> #include     <cmath> #define EPS 0.00000001#define pi acos ( -1,0)//#define PR 999983using namespace Std;int a[1010][1010]= {0};     int b[1010][1010]= {0};     BOOL c[1010][1010]= {0}; int N,m,_min,zkc;char s[1010];int init (int x,int y,int k) {if (X+y > _min) _min=x+y;//printf ("_min=%d\n", _min    );        if (y<m && b[x][y+1]==0 && a[x][y+1]==-1) {c[x][y+1]=1;        A[x][y+1]=1;    Init (x,y+1,k+1);        } if (x>1 && b[x-1][y]==0 && a[x-1][y]==-1) {c[x-1][y]=1;        A[x-1][y]=1;    Init (x-1,y,k+1);        } if (y>1 && b[x][y-1]==0 && a[x][y-1]==-1) {c[x][y-1]=1;        A[x][y-1]=1;    Init (x,y-1,k+1); } if (X<n && b[x+1][y]==0 &&        A[x+1][y]==-1) {c[x+1][y]=1;        A[x+1][y]=1;    Init (x+1,y,k+1); } return 0;}    int fun (int z) {int jj=min (z,m), ii=z-jj+1;    BOOL f=1;//printf ("z=%d ii=%d jj=%d\n", Z,II,JJ);            while (Ii<=n && jj>0) {if (C[ii-1][jj]==1 | | c[ii][jj-1]==1) {c[ii][jj]=1;        if (b[ii][jj]==0) f=0;        } ii++;    jj--;                                    }//for (int i=1; i<=n; i++)//{// for (int j=1; j<=m; j + +)//{//P                                rintf ("%d", c[i][j]);//}//printf ("\ n");//        } if (f==0) {jj=min (z,m);        ii=z-jj+1;            while (Ii<=n && jj>0) {if (b[ii][jj]==1) c[ii][jj]=0;            ii++;        jj--; }} if (Z+1&LT;m+n) Fun (z+1); return 0;}        int print (int ik,int jk) {if (IK+JK&GT;ZKC) {if (c[ik-1][jk]==1) {print (IK-1,JK);        } else if (c[ik][jk-1]==1) {print (ik,jk-1);    } printf ("%d", B[IK][JK]);    } if (IK+JK==ZKC) {if (b[ik][jk]==1) printf ("1"); } return 0;}    int main () {//Freopen ("In.txt", "R", stdin);    int T;    scanf ("%d", &t);        while (t--) {_min=-0x7f7f7f;        memset (A,-1,sizeof (a));        Memset (C,0,sizeof (c));        scanf ("%d%d", &n,&m);            for (int i=1; i<=n; i++) {scanf ("%s", s+1);            for (int j=1; j<=m; J + +) {B[i][j] = s[j]-' 0 ';        }} c[1][1]=1;            if (b[1][1]==0) {//printf ("ok\n");                        Init (1,1,0);            for (int i=1, i<=n; i++) for (int j=1; j<=m; J + +) if (c[i][j]==1) init (i,j,0); Zkc=_min;//printf ("zkc=%d\n", ZKC);        } else {zkc=2;        }//printf ("zkc%d\n", ZKC);            if (m==1 && n==1) {printf ("%d\n", b[1][1]);        Continue            } if (Zkc!=m+n) {fun (ZKC);        Print (N,M);        } else printf ("0"); printf ("\ n");//printf ("zkc=%d\n", ZKC);//for (int. I=1; i<=n; i++)//{//for (int j=1; j<=m; J + +)//{//printf ("%d", c[i][j]);//}//printf ("\ n");/}} RE Turn 0;}

The topics of recent games are relatively simple, but their sentence system comparison pit search easy broken stack (after the game will not break the stack)

And the minimum, that's a hell of a hole.

It's more than four games, and every time I check in, I can't even sign it. Look at Daniel AAAA We Wawawa mood what is secondary every time the knife to the edge of the neck

If you think about it, you still have to put down a person or a little hope, maybe the next one can sign in.

Yes, well, keep the water going.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

STD fourth Field 1001 1002 1004

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.