摘要:1 #include 2 #include 3 int n,n1,n2,link[1255],y[1255],g[1255][1255],mapl[55][55],mapr[55][55]; 4 char map[55][55]; 5 int dfs(int x) 6 { ...
阅读全文
摘要:1 #include 2 #include 3 int w,m, head[10005],point[10005],next[10005],y[10005],link[10005],now; 4 void add(int x,int y) 5 { 6 //now是边的数目 7 ne...
阅读全文
摘要:1 #include 2 #include 3 #include 4 using namespace std; 5 struct dian 6 { 7 int x,y; 8 }s[200005]; 9 int leftnum[500005],rightnum[500005...
阅读全文
摘要:1 #include 2 #include 3 #include 4 using namespace std; 5 struct LINE 6 { 7 double x,ydown,yup; 8 int flag; 9 bool operator=1)32 ...
阅读全文
摘要:1 #include 2 #include 3 int ql,qr,p; 4 long long fsum,v; 5 int f[100005],g[100005],a[100005],b[100005]; 6 int r[100005],l[100005],hash[100005],...
阅读全文
摘要:1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 int p,v,ql,qr,fsum,sumv[10005],d[10005],a[10005]; 7 void update(int o,int l,int ...
阅读全文
摘要:1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 int ql,qr,x,n,ll[150005],rl[150005],a[150005]; 7 stacks; 8 void build(in...
阅读全文
摘要:1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 int yy2,yy1,v,fsum; 8 int sumv[1000005],setv[1000005]; 9 10 void main...
阅读全文
摘要:1 #include 2 #include 3 int addv[100005],minv[100005],fmin,y1,y2,v,l[20005],d[20005],len[20005]; 4 int min(int x,int y) 5 { 6 if (x=r) addv[o]+=v...
阅读全文
摘要:1 #include 2 #include 3 #define MOD 10007 4 int main() 5 { 6 int n,x,y,i,j,k,doit[5][5],temp[5][5],a[5][2]; 7 while (~scanf("%d%d%d",&n,&x,&y...
阅读全文
摘要:1 #include 2 #include 3 char s[20][105]; 4 int ded[20],day[20],hash[40000]; 5 struct s 6 { 7 int time,pre,lost; 8 }dp[40000]; 9 void Print(int s...
阅读全文
摘要:1 #include 2 #include 3 long long result[15][15],dp[15][2050]; 4 int n,m,t; 5 long long dfs(int l,int state) 6 { 7 int i,j,judge,flag,last; 8 ...
阅读全文
摘要:1 #include 2 int max(int x,int y) 3 { 4 if (x>y) return x; 5 return y; 6 } 7 int v[105],w[105],ans[1000005]; 8 int main() 9 {10 int t=0,f...
阅读全文
摘要:1 #include 2 #include 3 int a[500005],b[500005],d[500005]; 4 void sort(int l,int r) 5 { 6 int i=l,j=r,x=a[(i+j)/2],y; 7 while (id[maxlen])41 ...
阅读全文
摘要:1 #include 2 #include 3 int dp[1000005],pre[1000005],a[1000005]; 4 int main() 5 { 6 int max1; 7 int i,j,n,m; 8 while (~scanf("%d%d",&m,&n...
阅读全文
摘要:1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 struct Edge 7 { 8 int to; //边终点 9 int w; //边值10 int next;//结构体模拟链...
阅读全文
摘要:1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 struct Edge 7 { 8 int to; //边终点 9 int w; //边值10 int next;//结构体模拟链...
阅读全文
摘要:1 #include 2 #include 3 int sz,ch[100005][30],val[100005]; 4 void insert(char *s) 5 { 6 int u=0,i,len=strlen(s); 7 for (i=0;i<len;i++) 8 ...
阅读全文
摘要:1 #include 2 #include 3 int ch[50005][100],sz=1,val[50005]; 4 char s[50005][105]; 5 void insert(char *s) 6 { 7 int i,u=0,len=strlen(s),c; 8 ...
阅读全文
摘要:1 #include 2 int d[100005][50]; 3 int max(int a,int b) 4 { 5 if (a>b) return(a); 6 return(b); 7 } 8 int rmq(int l,in...
阅读全文
摘要:1 #include 2 int ql,qr,p,v,minv[1000005]; 3 int max(int x,int y) 4 { 5 if (x>y) return(x); 6 return(y); 7 } 8 int qu...
阅读全文
摘要:1 #include 2 int n,c[1000005]; 3 int lowbit(int x) 4 { 5 return(x&-x); 6 } 7 void add(int x,int d) 8 { 9 while (x0)1...
阅读全文
摘要:1 #include 2 int a[10005],p[10005],q[10005],father[10005]; 3 int find(int x) 4 { 5 if (father[x]!=x) father[x]=find(father[x]); 6 return(fath...
阅读全文
摘要:1 #include 2 #define max 100000000; 3 int main() 4 { 5 int n,m,i,j,k,min,a,b,c,hash[1005],ar[1005],length[105][105]; 6 while (~scanf("%d%d",&...
阅读全文
摘要:1 #include 2 #include 3 int a[1000005],b[1000005],next[100005]; 4 int main() 5 { 6 int t,i,j,n,m; 7 while (~scanf("%d",&t)) 8 while (t--)...
阅读全文
摘要:1 #include 2 #include 3 typedef struct dian 4 { 5 int x,y; 6 }; 7 dian p[50005],ch[50005]; 8 double area(int i,int j,int k) 9 {10 double a,b,...
阅读全文
摘要:1 #include 2 int main() 3 { 4 int n,k,a,i; 5 while (~scanf("%d",&n)&&n!=0) 6 { 7 k=0; 8 for (i=1;i 2 int main() 3 { 4 ...
阅读全文
摘要:1 #include 2 #include 3 int main() 4 { 5 int t,n,m,x; 6 while (~scanf("%d%d",&n,&m)) 7 { 8 if (n>m) {t=m; m=n; n=t; } 9 t...
阅读全文
摘要:1 #include 2 #include 3 int x[100005],y[100005],ch[100005]; 4 void sort(int l,int r) 5 { 6 int i,j,xx,yy,x1; 7 i=l; j=r; 8 xx=x[(i+j)/2];...
阅读全文
摘要:1 #include 2 #include 3 int sz=1,father[1000005],val[1000005],ch[1000005][30]; 4 void insert(char *s) 5 { 6 int u=0,i,len=strlen(s); 7 for (i...
阅读全文
摘要:1 #include 2 #include 3 #include 4 using namespace std; 5 typedef struct dian 6 { 7 friend bool operatorn2.time);10 }11 int x,y,time;12 }...
阅读全文
摘要:1 #include 2 #include 3 int main() 4 { 5 int i,j,k,n,m,c1[10005],c2[10005]; 6 while (~scanf("%d",&n)) 7 { 8 for (i=0;i<=n;i++) ...
阅读全文
摘要:1 #include 2 #include 3 int h[10005],xl[10005],xr[10005],dp[10005][5]; 4 int min(int a,int b) 5 {if (a=1;j--)41 if (xl[j]=1;j--)48 ...
阅读全文
摘要:1 #include 2 #include 3 int hash[25],map[25][5],m,k,jilu[25]; 4 void dfs(int now,int step) 5 { 6 int i,judge; 7 jilu[step]=now; 8 if (ste...
阅读全文
摘要:1 #include 2 #include 3 typedef struct dian 4 { 5 int x,y; 6 }; 7 dian p[50005],ch[50005]; 8 double area(int i,int j,int k) 9 {10 double a,b,...
阅读全文
摘要:1 #include 2 #include 3 int n,m,min,father[15],map[15][15]; 4 int find(int i) 5 { 6 if (father[i]!=i) return(find(father[i])); 7 return(fathe...
阅读全文
摘要:1 #include 2 int exgcd(__int64 a,__int64 b,__int64 &x,__int64 &y) 3 { 4 __int64 t,r; 5 if (b==0){ 6 x=1; y=0; 7 return(a); 8 ...
阅读全文
摘要:1 #include 2 #include 3 #include 4 #include 5 #define MAX 1000003 6 #define MOD 1000000007 7 #define LL long long 8 using namespace std; 9 10 __i...
阅读全文
摘要:1 #include 2 #include 3 #define MOD 1000000007 4 __int64 ans[100005],c[100005]; 5 int a[100005],wei[100005],n; 6 void sort(int l,int r) 7 { 8 int...
阅读全文
摘要:1 #include 2 #include 3 int map[505][505],into[505],w[505]; 4 int main() 5 { 6 int n,m,u,v,i,j,k; 7 while (~scanf("%d%d",&n,&m)) 8 { 9 ...
阅读全文
摘要:1 #include 2 #include 3 int xx[]={0,0,1,-1}; 4 int yy[]={1,-1,0,0}; 5 int used[15][15]; 6 char map[15][15]; 7 int n,m,t,x2,y2; 8 typedef struct dian ...
阅读全文
摘要:1 #include 2 #include 3 int g[505][505],y[505],link[505],n1,n2; 4 int find(int x) 5 { 6 int i; 7 for (i=1;i<=n2;i++) 8 if (g[x][i]==1&&y...
阅读全文
摘要:1 #include 2 #include 3 int number[505],dian1[505],dian2[505],y[505],link[505],hash[505]; 4 int f[505][505],g[505][505]; 5 int n1,n2; 6 int doit(int ...
阅读全文
摘要:1 #include 2 #include 3 char s[105]; 4 int ans[105],temp[105],temp1[105][105],a[105][105]; 5 int main() 6 { 7 int i,j,k,n,m; 8 while (~scanf(...
阅读全文
摘要:1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 typedef struct node 8 { 9 int f,g,h; 10 int x,y; 11 ...
阅读全文
摘要:1 #include 2 int a[100005],b[100005],maxlen[100005]; 3 void sort(int l,int r) 4 { 5 int i,j,x,y,x1,y1; 6 i=l; j=r; 7 x=a[(i+j)/2]; x1=b[(...
阅读全文
摘要:1 #include 2 #include 3 #define INF 1000000000 4 int hash[45][45][45][45],judge[45][45][45][45],map[45][45],m,n; 5 int dp(int i,int j,int h,int w) 6 ...
阅读全文
摘要:1 #include 2 #include 3 #include 4 using namespace std; 5 int hash[100005],k[100005],a[100005]; 6 int main() 7 { 8 int n,sum,i,j,x,sum1,t; 9 ...
阅读全文
摘要:1 #include 2 #include 3 #include 4 #define inf 1000000000 5 int hash[10][10][10][10][20]; 6 int s[10][10][10][10],fsum[10][10][10][10]; 7 int dp(int ...
阅读全文
摘要:#include#include#includeusing namespace std;char s[100005];int t;struct dian{ friend bool operator n2.x); } int node,l,r,x;};dian n[105],n1...
阅读全文
摘要:1 #include 2 #include 3 #include 4 using namespace std; 5 int xx[4]={0,0,1,-1}; 6 int yy[4]={1,-1,0,0}; 7 int used[125][125],hash[125][125],sum,n,m; ...
阅读全文
摘要:1 #include 2 #include 3 int vis[100005],prime[100005]; 4 int main() 5 { 6 int cnt,dd,i,j,t,T,n,ans,temp; 7 cnt=0; dd=int(1.0*sqrt(1000000000....
阅读全文
摘要:1 #include 2 long long gcd(long long a,long long b) 3 { 4 if (b==0) return a; 5 return(gcd(b,a%b)); 6 } 7 int main() 8 { 9 long long m,n;...
阅读全文
摘要:#include#include#include#includeusing namespace std;int son1[205],f[205][205],dp[205][2],dup[205][2],hash[205];char s[205][105],s1[105],s2[105];void d...
阅读全文
摘要:1 #include 2 #include 3 int max(int a,int b) 4 { 5 if (a>b) return a; 6 return b; 7 } 8 int m; 9 int dp[150][150],son[150],bug[150],pos[150],...
阅读全文