UVA大模拟代码(白书训练计划1)UVA 401,10010,10361,537,409,10878,10815,644,10115,424,10106,465,10494
白书一:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=64609#overview
注意UVA没有PE之类的,如果PE了显示WA。
UVA401:Palindromes
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <algorithm>
using namespace std;
char a[];
int l,flag,flag2,f3;
void init()
{
flag=;
flag2=;
f3=;
}
void judge();
int main()
{
while(scanf("%s",a)!=EOF)
{
l=strlen(a);
init();
for(int i=; i<l/; i++)
{
if(a[i]!=a[l--i])
{
flag=;
break;
}
}
judge();
if(flag==&&flag2==)
{
printf("%s -- is not a palindrome.\n",a);
cout<<endl;
continue;
}
if(flag==&&flag2==)
{
printf("%s -- is a regular palindrome.\n",a);
cout<<endl;
continue;
}
for(int i=; i<l/; i++)
{
if(a[i]=='A'&&a[l-i-]=='A') ;
else if(a[i]=='M'&&a[l-i-]=='M') ;
else if(a[i]=='H'&&a[l-i-]=='H') ;
else if(a[i]=='I'&&a[l-i-]=='I') ;
else if(a[i]=='Y'&&a[l-i-]=='Y') ;
else if(a[i]=='O'&&a[l-i-]=='O') ;
else if(a[i]=='T'&&a[l-i-]=='T') ;
else if(a[i]=='U'&&a[l-i-]=='U') ;
else if(a[i]=='V'&&a[l-i-]=='V') ;
else if(a[i]=='W'&&a[l-i-]=='W') ;
else if(a[i]=='X'&&a[l-i-]=='X') ;
else if(a[i]==''&&a[l-i-]=='') ;
else if(a[i]==''&&a[l-i-]=='') ;
else if((a[i]=='E'&&a[l-i-]=='')||(a[i]==''&&a[l-i-]=='E')) ;
else if((a[i]=='J'&&a[l-i-]=='L')||(a[i]=='L'&&a[l-i-]=='J')) ;
else if((a[i]=='S'&&a[l-i-]=='')||(a[i]==''&&a[l-i-]=='S')) ;
else if((a[i]=='Z'&&a[l-i-]=='')||(a[i]==''&&a[l-i-]=='Z')) ;
else
{
f3=;
break;
}
}
if(l%==)
{
if(a[l/]=='E'||a[l/]=='J'||a[l/]=='L'||a[l/]=='Z'||a[l/]==''||a[l/]=='S'||a[l/]==''||a[l/]=='')
{
f3=;
}
}
if(flag==&&f3==)
{
printf("%s -- is not a palindrome.\n",a);
cout<<endl;
continue;
}
if(flag==&&f3==)
{
printf("%s -- is a regular palindrome.\n",a);
cout<<endl;
continue;
}
if(flag==&&f3==)
{
printf("%s -- is a mirrored string.\n",a);
cout<<endl;
continue;
}
else
{
printf("%s -- is a mirrored palindrome.\n",a);
cout<<endl;
}
}
return ;
}
void judge()
{
for(int i=; i<l; i++)
{
switch(a[i])
{
case 'A':
break;
case 'E':
break;
case 'H':
break;
case 'I':
break;
case 'L':
break;
case 'J':
break;
case 'M':
break;
case 'O':
break;
case 'S':
break;
case 'T':
break;
case 'U':
break;
case 'V':
break;
case 'W':
break;
case 'X':
break;
case 'Y':
break;
case 'Z':
break;
case '':
break;
case '':
break;
case '':
break;
case '':
break;
case '':
break;
default :
flag2=;
}
}
}
UVA10010:Where's Waldorf?
#include <iostream>
#include <cstdio>
#include <string.h>
#include <cstdlib>
#include <algorithm>
using namespace std;
struct node
{
int x,y;
};
int n,m,k,l,flag,txx,tyy;
char map[][],ch[];
void init()
{
flag=;
txx=;
tyy=;
}
void dfs1(int x,int y,int le)
{
if(le==l)
{
flag=;
return ;
}
struct node t;
t.x=x;
t.y=y-;
if(t.x>=&&t.x<n&&t.y>=&&t.y<m&&map[t.x][t.y]==ch[le])
{
dfs1(t.x,t.y,le+);
}
return ;
}
void dfs2(int x,int y,int le)
{
if(le==l)
{
flag=;
return ;
}
struct node t;
t.x=x-;
t.y=y-;
if(t.x>=&&t.x<n&&t.y>=&&t.y<m&&map[t.x][t.y]==ch[le])
{
dfs2(t.x,t.y,le+);
}
return ;
}
void dfs3(int x,int y,int le)
{
if(le==l)
{
flag=;
return ;
}
struct node t;
t.x=x-;
t.y=y;
if(t.x>=&&t.x<n&&t.y>=&&t.y<m&&map[t.x][t.y]==ch[le])
{
dfs3(t.x,t.y,le+);
}
return ;
}
void dfs4(int x,int y,int le)
{
if(le==l)
{
flag=;
return ;
}
struct node t;
t.x=x-;
t.y=y+;
if(t.x>=&&t.x<n&&t.y>=&&t.y<m&&map[t.x][t.y]==ch[le])
{
dfs4(t.x,t.y,le+);
}
return ;
}
void dfs5(int x,int y,int le)
{
if(le==l)
{
flag=;
return ;
}
struct node t;
t.x=x;
t.y=y+;
if(t.x>=&&t.x<n&&t.y>=&&t.y<m&&map[t.x][t.y]==ch[le])
{
dfs5(t.x,t.y,le+);
}
return ;
}
void dfs6(int x,int y,int le)
{
if(le==l)
{
flag=;
return ;
}
struct node t;
t.x=x+;
t.y=y-;
if(t.x>=&&t.x<n&&t.y>=&&t.y<m&&map[t.x][t.y]==ch[le])
{
dfs6(t.x,t.y,le+);
}
return ;
}
void dfs7(int x,int y,int le)
{
if(le==l)
{
flag=;
return ;
}
struct node t;
t.x=x+;
t.y=y;
if(t.x>=&&t.x<n&&t.y>=&&t.y<m&&map[t.x][t.y]==ch[le])
{
dfs7(t.x,t.y,le+);
}
return ;
}
void dfs8(int x,int y,int le)
{
if(le==l)
{
flag=;
return ;
}
struct node t;
t.x=x+;
t.y=y+;
if(t.x>=&&t.x<n&&t.y>=&&t.y<m&&map[t.x][t.y]==ch[le])
{
dfs8(t.x,t.y,le+);
}
return ;
}
int main()
{
int T,ll;
scanf("%d",&T);
getchar();
while(T--)
{
scanf("%d%d",&n,&m);
for(int i=; i<n; i++)
{
scanf("%*c%s",map[i]);
ll=strlen(map[i]);
for(int j=;j<ll;j++)
{
if(map[i][j]>='A'&&map[i][j]<='Z')
map[i][j]+=;
}
}
scanf("%d",&k);
while(k--)
{
init();
scanf("%s",ch);
l=strlen(ch);
for(int i=;i<l;i++)
{
if(ch[i]>='A'&&ch[i]<='Z')
ch[i]+=;
}
for(int i=; i<n; i++)
{
for(int j=; j<m; j++)
{
if(map[i][j]==ch[])
{
txx=i+;
tyy=j+;
dfs1(i,j,);
if(flag)
break;
dfs2(i,j,);
if(flag)
break;
dfs3(i,j,);
if(flag)
break;
dfs4(i,j,);
if(flag)
break;
dfs5(i,j,);
if(flag)
break;
dfs6(i,j,);
if(flag)
break;
dfs7(i,j,);
if(flag)
break;
dfs8(i,j,);
if(flag)
break;
}
}
if(flag) break;
}
printf("%d %d\n",txx,tyy);
}
if(T) printf("\n");
}
return ;
}
UVA10361:Automatic Poetry
#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
int n,l1,l2,l3,l4,l5,l6;
char a[],b[];
void init()
{
l3=-;
l4=-;
l5=-;
l6=-;
}
int main()
{
scanf("%d",&n);
getchar();
while(n--)
{
gets(a);
gets(b);
l1=strlen(a);
l2=strlen(b);
init();
for(int i=;i<l1;i++)
{
if(a[i]!='<'&&a[i]!='>')
{
printf("%c",a[i]);
}
else if(a[i]=='<'&&l3==-)
{
l3=i;
}
else if(a[i]=='>'&&l4==-)
{
l4=i;
}
else if(a[i]=='<'&&l5==-)
{
l5=i;
}
else if(a[i]=='>'&&l6==-)
{
l6=i;
}
}
printf("\n");
for(int i=;i<l2;i++)
{
if(b[i]=='.')
break;
printf("%c",b[i]);
} for(int i=l5+;i<l6;i++)
{
printf("%c",a[i]);
}
for(int i=l4+;i<l5;i++)
{
printf("%c",a[i]);
}
for(int i=l3+;i<l4;i++)
{
printf("%c",a[i]);
}
for(int i=l6+;i<l1;i++)
{
printf("%c",a[i]);
}
printf("\n");
}
return ;
}
UVA537:Artificial Intelligence?
#include <iostream>
#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <stdlib.h>
#define inf 0x3f3f3f3f
using namespace std;
char a[],b[],c[],d[];
int l,U,I,P,t1,t2,t3;
double v1,i1,w1;
void init()
{
U=inf;
I=inf;
P=inf;
v1=;
i1=;
w1=;
t1=t2=t3=;
}
int main()
{
int T;
scanf("%d",&T);
getchar();
for(int z=; z<=T; z++)
{
init();
gets(a);
l=strlen(a);
for(int i=; i<l; i++)
{
if(a[i]=='U'&&a[i+]=='=')
{
for(int j=i+; j<l; j++)
{
if((a[j]>=''&&a[j]<='')||a[j]=='.')
{
b[t1++]=a[j];
}
else
{
b[t1]='\0';
if(a[j]=='k')
v1=;
else if(a[j]=='V')
v1=;
else if(a[j]=='m')
v1=0.001;
else if(a[j]=='M')
v1=;
break;
}
}
U=;
}
else if(a[i]=='I'&&a[i+]=='=')
{
for(int j=i+; j<l; j++)
{
if((a[j]>=''&&a[j]<='')||a[j]=='.')
{
c[t2++]=a[j];
}
else
{
c[t2]='\0';
if(a[j]=='m')
i1=0.001;
else if(a[j]=='M')
i1=;
else if(a[j]=='k')
i1=;
else if(a[j]=='A')
i1=;
break;
}
}
I=;
}
else if(a[i]=='P'&&a[i+]=='=')
{
for(int j=i+; j<l; j++)
{
if((a[j]>=''&&a[j]<='')||a[j]=='.')
{
d[t3++]=a[j];
}
else
{
d[t3]='\0';
if(a[j]=='M')
w1=;
else if(a[j]=='m')
w1=0.001;
else if(a[j]=='k')
w1=;
else if(a[j]=='W')
w1=;
break;
}
}
P=;
}
}
printf("Problem #%d\n",z);
double sum;
if(U==&&I==)
{
sum=atof(b)*atof(c)*v1*i1;
printf("P=%.2lfW\n",sum);
}
else if(U==&&P==)
{
sum=(atof(d)*w1)/(atof(b)*v1);
printf("I=%.2lfA\n",sum);
}
else if(I==&&P==)
{
sum=(atof(d)*w1)/(atof(c)*i1);
printf("U=%.2lfV\n",sum);
}
cout<<endl;
}
return ;
}
UVA409:Excuses, Excuses!
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <algorithm>
using namespace std;
typedef struct Node
{
struct Node *next[];
int flag;
} Node,*Tree;
int n,m,K,ll,M;
void Creat(Tree &T)
{
T=(Node *)malloc(sizeof(Node));
T->flag=;
for(int i=; i<; i++)
T->next[i]=NULL;
}
void insert(Tree &T,char *s)
{
Tree p=T;
int t;
int l=strlen(s);
for(int i=; i<l; i++)
{
if(s[i]>='a'&&s[i]<='z')
t=s[i]-'a';
else t=s[i]-'A';
if(p->next[t]==NULL)
Creat(p->next[t]);
p=p->next[t];
}
p->flag=;
}
void search(Tree &T,char *s)
{
Tree p=T;
int t;
int l=strlen(s);
for(int i=; i<l; i++)
{
if(s[i]>='a'&&s[i]<='z')
t=s[i]-'a';
else t=s[i]-'A';
if(p->next[t]==NULL)
return ;
p=p->next[t];
}
if(p->flag==)
M++;
return ;
}
void D(Tree p)
{
for(int i=; i<; i++)
{
if(p->next[i]!=NULL)
D(p->next[i]);
}
free(p);
}
int main()
{
K=;
char ch[],q[],aa[][];
int f1,p[],maxx;
while(scanf("%d%d",&n,&m)!=EOF)
{
Tree T;
maxx=-;
memset(p,,sizeof(p));
Creat(T);
for(int i=; i<n; i++)
{
scanf("%s",ch);
insert(T,ch);
}
getchar();
for(int i=; i<m; i++)
{
gets(ch);
strcpy(aa[i],ch);
ll=strlen(ch);
f1=;
M=;
for(int j=; j<ll; j++)
{
if((ch[j]>='a'&&ch[j]<='z')||(ch[j]>='A'&&ch[j]<='Z'))
{
q[f1++]=ch[j];
}
else
{
q[f1]='\0';
if(f1!=)
search(T,q);
f1=;
}
}
if(f1!=)
{
q[f1]='\0';
search(T,q);
}
//cout<<"M=="<<M<<endl;
maxx=max(maxx,M);
p[i]=M;
}
printf("Excuse Set #%d\n",++K);
for(int i=; i<m; i++)
{
if(p[i]==maxx)
printf("%s\n",aa[i]);
}
D(T);
printf("\n");
}
return ;
}
UVA10878: Decode the tape
#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>
using namespace std;
int t,l,ll,tt;
char a[];
int main()
{
tt=;
while(gets(a)!=NULL)
{
if(strcmp(a,"___________")==)
{
continue;
}
l=strlen(a);
t=;
ll=;
for(int i=l-;i>=;i--)
{
if(a[i]==' ')
{
ll++;
}
else if(a[i]=='o')
{
t+=pow(,ll);
ll++;
}
}
printf("%c",t);
}
return ;
}
UVA10815:Andy's First Dictionary
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <algorithm>
using namespace std;
typedef struct Node
{
struct Node *next[];
int flag;
} Node,*Tree;
int f1,l,tt;
char a[][],CH[];
void Creat(Tree &T)
{
T=(Node *)malloc(sizeof(Node));
T->flag=;
for(int i=; i<; i++)
T->next[i]=NULL;
}
void insert(Tree &T,char *s)
{
Tree p=T;
int t;
int l=strlen(s);
for(int i=; i<l; i++)
{
if(s[i]>='a'&&s[i]<='z')
t=s[i]-'a';
else t=s[i]-'A';
if(p->next[t]==NULL)
Creat(p->next[t]);
p=p->next[t];
}
p->flag=;
}
void D(Tree p)
{
for(int i=; i<; i++)
{
if(p->next[i]!=NULL)
D(p->next[i]);
}
free(p);
}
void dfs(Tree &P,int r,int l)
{
if(P->flag>)
{
CH[l]='a'+r;
CH[l+]='\0';
printf("%s\n",CH);
}
else CH[l]=CH[l]='a'+r;
for(int i=; i<; i++)
{
if(P->next[i]!=NULL)
dfs(P->next[i],i,l+);
}
}
int main()
{
Tree T;
tt=;
while(gets(a[tt])!=NULL)
{
tt++;
}
Creat(T);
char ch[];
for(int i=; i<tt; i++)
{
l=strlen(a[i]);
f1=;
for(int j=; j<l; j++)
{
if((a[i][j]>='a'&&a[i][j]<='z')||(a[i][j]>='A'&&a[i][j]<='Z'))
{
ch[f1++]=a[i][j];
}
else
{
ch[f1]='\0';
// printf("%s\n",ch);
if(f1!=)
insert(T,ch);
f1=;
}
}
if(f1!=)
{
ch[f1]='\0';
insert(T,ch);
//printf("%s\n",ch);
}
}
for(int i=; i<; i++)
{
if(T->next[i]!=NULL)
dfs(T->next[i],i,);
}
D(T);
return ;
}
UVA644: Immediate Decodability
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <algorithm>
using namespace std;
typedef struct Node
{
struct Node *next[];
int flag;
} Node,*Tree;
int f1;
int cmp(const void *aa,const void *bb)
{
return strcmp((char *)bb,(char *)aa);
}
void Creat(Tree &T)
{
T=(Node *)malloc(sizeof(Node));
T->flag=;
for(int i=; i<; i++)
T->next[i]=NULL;
}
void insert(Tree &T,char *s)
{
Tree p=T;
int t;
int l=strlen(s);
for(int i=; i<l; i++)
{
t=s[i]-'';
if(p->next[t]==NULL)
Creat(p->next[t]);
p=p->next[t];
p->flag++;
}
if(p->flag>)
{
f1=;
}
}
void D(Tree p)
{
for(int i=; i<; i++)
{
if(p->next[i]!=NULL)
D(p->next[i]);
}
free(p);
}
char a[][];
int main()
{ Tree T;
int K=,tt=;
while(scanf("%s",a[])!=EOF)
{
if(strcmp(a[],"")==) break;
tt=;
while(scanf("%s",a[tt])!=EOF)
{
if(strcmp(a[tt],"")==)
break;
tt++;
}
Creat(T);
f1=;
qsort(a,tt,sizeof(a[]),cmp);
for(int i=; i<tt; i++)
{
insert(T,a[i]);
if(f1==) break;
}
if(f1)
printf("Set %d is immediately decodable\n",++K);
else printf("Set %d is not immediately decodable\n",++K);
D(T);
}
return ;
}
UVA10115:Automatic Editing
#include <iostream>
#include <stdio.h>
#include <string.h>
#include <algorithm>
using namespace std;
int n;
char a[][],b[][],ch[],t[];
int main()
{
while(scanf("%d",&n)!=EOF&&n!=)
{
getchar();
for(int i=;i<n;i++)
{
gets(a[i]);
gets(b[i]);
}
gets(ch);
for(int i=;i<n;++i)
{
if(strstr(ch,a[i])!=NULL)//如果没有返回空
{
char *p=strstr(ch,a[i]);
int l=strlen(a[i]);
strcpy(t,p+l);
*p='\0';
strcat(ch,b[i]);
strcat(ch,t);
i--;
}
}
printf("%s\n",ch);
}
return ;
}
UVA424:Integer Inquiry
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
using namespace std; int main()
{
int l1;
char a[];
int b[];
memset(b,,sizeof(b));
while(scanf("%s",a)!=EOF)
{
if(a[]=='') break;
l1=strlen(a);
int j=;
for(int i=l1-; i>=; i--)
{
b[j]=b[j]+a[i]-'';
j++;
}
}
int t;
for(int i=; i<; i++)
{
t=b[i];
if(b[i]>)
{
b[i]=t%;
b[i+]=b[i+]+t/;
}
else b[i]=t;
}
int flag=;
for(int i=-; i>=; i--)
{
if (flag || b[i])
{
flag = ;
printf("%d",b[i]);
}
}
if (!flag) printf("");
printf("\n");
return ;
}
UVA10106:Product
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <algorithm>
using namespace std;
char str1[],str2[];
int d[],f[],c[];
int l1,l2,l,w,e;
void init()
{
memset(c,,sizeof(c));
memset(d,,sizeof(d));
memset(f,,sizeof(f));
}
int main()
{
while(scanf("%s",str1)!=EOF)
{
init();
scanf("%s",str2);
l1=strlen(str1);
l2=strlen(str2);
l=max(l1,l2);
w=l1;
e=l2;
for(int i=; i<l; i++)
{
if(l1->=)
{
d[i]=str1[l1-]-'';
l1--;
}
else d[i]=;
if(l2->=)
{
f[i]=str2[l2-]-'';
l2--;
}
else f[i]=;
}
for(int i=; i<w; i++)
{
for(int j=; j<e; j++)
{
c[i+j]=c[i+j]+d[i]*f[j];
}
}
for(int i=; i<; i++)
{
if(c[i]>=)
{
c[i+]+=c[i]/;
c[i]=c[i]%;
}
}
int flag=;
for(int i=; i>=; i--)
{
if(flag||c[i])
{
flag=;
printf("%d",c[i]);
}
}
if(flag==) printf("");
printf("\n"); }
return ;
}
UVA465:Overflow
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdlib>//atof函数
#include <algorithm>
#define inf 0x7fffffff// inf==2147483647
using namespace std;
char a[],b[],c[];
double x,y;
int main()
{
while(scanf("%s%s%s",a,b,c)!=EOF)
{
printf("%s %s %s\n",a,b,c);
x=atof(a);
y=atof(c);
if(x>inf)printf("first number too big\n");
if(y>inf)printf("second number too big\n");
if(strcmp(b,"+")==&&x+y>inf)printf("result too big\n");
else if(strcmp(b,"*")==&&x*y>inf)printf("result too big\n");
}
return ;
}
/*
函数名: atof
功 能: 把字符串转换成浮点数
用 法: double atof(const char *nptr);
程序例:
*/
UVA10494: If We Were a Child Again
#include <iostream>
#include <stdio.h>
#include <string.h>
#include <algorithm>
using namespace std;
char a[],b[],c[];
long long d;
long long MOD(char * src, long long mod)//模板
{
long long len=strlen(src),i;
long long t=;//中间变量,最终存储余数
for(i=; i<len; i++)
{
t*=;
t+=src[i]-'';
if(t>=mod)
t=t%mod;
}
return t;
}
void division(char * src, long long n)//模板
{
long long len = strlen(src),i,k,t=,s=;
char dest[];
bool flag = true; //商是否有了第一个有效位,防止商首部一直出现0
for(i=,k=; i<len; i++)
{
t = s*+(src[i]-); //新余数
if(t/n> || t==) //余数为0要修改商
{
dest[k++] = t/n+,s = t%n,flag = false;
}
else //不够除,修改余数
{
s = t;
if(!flag) //商已经有有效位了,补零
dest[k++] = '';
}
}
for(i=; i<k; i++)
cout<<dest[i];
cout<<endl;
}
int main()
{
while(scanf("%s%s%lld",a,b,&d)!=EOF)
{
if(strcmp(b,"/")==)
{
division(a,d);
}
else if(strcmp(b,"%")==)
{
cout<<MOD(a,d)<<endl;
}
}
return ;
}
UVA大模拟代码(白书训练计划1)UVA 401,10010,10361,537,409,10878,10815,644,10115,424,10106,465,10494的更多相关文章
- (白书训练计划)UVa 120 Stacks of Flapjacks(构造法)
题目地址:UVa 120 水题. 从最大的開始移,每次都把大的先翻到最上面,再翻到以下. 代码例如以下: #include <iostream> #include <cstdio&g ...
- (白书训练计划)UVa 11572 Unique Snowflakes(窗体滑动法)
题目地址:UVa 11572 这样的方法曾经接触过,定义两个指针,不断从左向右滑动,推断指针内的是否符合要求. 这个题为了能高速推断是否有这个数,能够用STL中的set. 代码例如以下: #inclu ...
- HDU 5920 Ugly Problem 高精度减法大模拟 ---2016CCPC长春区域现场赛
题目链接 题意:给定一个很大的数,把他们分为数个回文数的和,分的个数不超过50个,输出个数并输出每个数,special judge. 题解:现场赛的时候很快想出来了思路,把这个数从中间分为两部分,当位 ...
- AC日记——神奇的幻方 洛谷 P2615(大模拟)
题目描述 幻方是一种很神奇的N*N矩阵:它由数字1,2,3,……,N*N构成,且每行.每列及两条对角线上的数字之和都相同. 当N为奇数时,我们可以通过以下方法构建一个幻方: 首先将1写在第一行的中间. ...
- 【阿里聚安全·安全周刊】双十一背后的“霸下-七层流量清洗”系统| 大疆 VS “白帽子”,到底谁威胁了谁?
关键词:霸下-七层流量清洗系统丨大疆 VS "白帽子"丨抢购软件 "第一案"丨企业安全建设丨Aadhaar 数据泄漏丨朝鲜APT组织Lazarus丨31款违规A ...
- poj2991 Crane(线段树+集合)白书例题
题目大意:起重机有n节,题目给出要调节的k节,每节调节成x度,求最后底部的起重机的坐标(最顶上的起点为(0,0)). 分析:一开始我看白书,看不懂他那个向量旋转的坐标是怎么来的,翻了很多博客,才发现, ...
- Uva10474-STL水题-白书
白书的一道水题.话说好久没认真做难题了.今天出了排名,所有队伍里倒数第一啊! 代码没什么可说的了. #include <algorithm> #include <cstring> ...
- 紫书 例题 11-13 UVa 10735(混合图的欧拉回路)(最大流)
这道题写了两个多小时-- 首先讲一下怎么建模 我们的目的是让所有点的出度等于入度 那么我们可以把点分为两部分, 一部分出度大于入度, 一部分入度大于出度 那么显然, 按照书里的思路,将边方向后,就相当 ...
- Bzoj1972: [Sdoi2010]猪国杀 题解(大模拟+耐心+细心)
猪国杀 - 可读版本 https://mubu.com/doc/2707815814591da4 题目可真长,读题都要一个小时. 这道题很多人都说不可做,耗时间,代码量大,于是,本着不做死就不会死的精 ...
随机推荐
- CSS定位背景图片 background-position
网站的样式的时候经常会发现一种情况,就是在很多background属性里都调用同一张图片,来满足网页各个部分的使用.打开这种图片看一下,会发现这张图片上包含了很多小图片; 又如: 这些小图片就是整图分 ...
- win7 安装 VMware 出错解决办法
win7旗舰版安装VMware,安装过程中发生了如下错误.系统提示:“You may not install this product in the root directory of any dri ...
- mysql的引擎myisam和innodb的区别
1. MYISAM和INNODB的不同?答:主要有以下几点区别: a)构造上的区别 MyISAM在磁盘上存储成三个文件,其中.frm文件存储表定义:.MYD (MYData)为数据文件:. ...
- 我学cocos2d-x (三) Node:一切可视化对象的祖先
在cocos2d-x中一切可视化的对象都继承自Node(如文字(label).精灵(sprite).场景(scene).布局(layer)).这是一个纯虚类.主要负责决定元素显示的位置. 由导演(Di ...
- POJ 1180 Batch Scheduling
BTW: 刚在图书馆借了本算法艺术与信息学竞赛. 我多次有买这本书的冲动, 但每次在试看之后就放弃了, 倒不是因为书太难, 而是写的实在是太差. 大家对这本书的评价很高, 我觉得多是因为书的内容, 而 ...
- 赠 看穿一切的var_dump
看穿一切的var_dump同学让我送他一首诗,于是作诗如下: 看穿一切被看穿,莫让年少酿毒烟.骄心当制能补拙,拨开云雾见上仙!
- Linux 防火墙:Netfilter
一.Netfilter 简介 (1) Netfilter 是 Linux 内置的一种防火墙机制,我们一般也称之为数据包过滤机制,而 iptables 只是操作 netfilter 的一个命令行工具(2 ...
- OnGlobalLayoutListener用法
1.implements ViewTreeObserver.OnGlobalLayoutListener{} 2.mContentView.getViewTreeObserver().addOnGlo ...
- PHP和shell脚本遍历目录及其下子目录
用shell写了个递归遍历目录的脚本,本脚本实现递归遍历指定目录,打印目录下的文件名(全路径). #!/bin/sh function scandir() { local cu ...
- php实现一个简单的购物网站
实现一个简单的购物网站 一.考试时间:8小时 二.开发工具:DW 三.数据库:见附件 四.需要实现的页面: Index:浏览商品页面,显示商品列表,用户可以点击“购买“. ViewCart:查看购物车 ...