label stringlengths 1 2 | index stringlengths 1 5 | code stringlengths 87 8.24k |
|---|---|---|
2 | 900 | int main()
{
int i,j,k,n,num[1000],len[1000],num1[1000][26]={0},sum[26]={0},max=0,m;
char writer[1000][26],letter[26]={'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d%s",&num[i],writer[i]);
len[i]=strle... |
2 | 901 | int n;
struct student
{
char name[100];
int num;
struct student *next;
};
struct student *creat(void)
{
struct student *head;
struct student *p1,*p2;
int i;
p1=p2=(struct student*)malloc(LEN);
head=p1;
for(i=0;i<n;i++)
{p1=(struct student*)malloc(LEN);
p2->next=p1;
p2=p1;
scanf("%d %s",&p1->num,p1->... |
2 | 902 | struct stu{
int id;
char author[26];
int length;
}a[1000];
int main(){
int n,i,k,num=0,max=0;
char b,c;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%s",&a[i].id,a[i].author);
a[i].length=strlen(a[i].author);
}
for(b='A';b<='Z';b++){
num=0;
for(i=0;i<n;i++){
for(k=0;k<a[i].length;k++){
if(a[i].au... |
2 | 903 |
struct stu{
int num;
char id[26];
}a[999];
struct aut{
char wri;
int sum;
}b[26];
int main(){
int n,i,j,k,t,m=0;
for(i=0;i<26;i++){
b[i].wri='A'+i;
b[i].sum=0;
}
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d",&a[i].num);
scanf("%s",a[i].id);
}
for(j=0;j<26;j++){
for(i=0;i<n;i++){
for(k=0;k<... |
2 | 904 | struct info
{
int nam;
char aut[27];
}inf[1000];
void main()
{
int n,i,a[26]={0},k,max=0,sum=0;
char *p;
scanf("%d",&n);
for(i=0;i<n;i++)
scanf("%d%s",&inf[i].nam,inf[i].aut);
for(i=0;i<n;i++)
{
p=inf[i].aut;
while(*p!='\0')
{
a[*p-65]++;
p++;
}
}
for(i=0;i<26;i++)
max=max>a[i]?max:a[i];
fo... |
2 | 905 |
int main()
{
int m;
struct bo
{int a;
char au[36];
};
struct bo bo[999];
int i,j;
char k,K;
int sb[26]={0},sbt;
int len;
int n;
scanf("%d",&m);
for(i=0;i<m;i++){
scanf("%d %s",&bo[i].a,bo[i].au);
len=strlen(bo[i].au);
for(j=0;j<len;j++){
for(k=65;k<91;k++){
if(bo[i].au[j]==k){
sb[k-65]++... |
2 | 906 |
int m,n;
struct student
{
int id;
char name[100];
struct student* next;
};
struct student *creat()
{
int i=1;
struct student *head,*p1,*p2;
p1=p2=(struct student*)malloc(len);
scanf("%d",&m);
scanf("%d %s",&p1->id,p1->name);
head=NULL;
for(;i<m;i++)
{
if(i==1) head=p1;
p1=(struct student*)malloc(len)... |
2 | 907 | int main()
{
int i,j,k,l,m,n,g[26]={0},s[26][1000]={0};
char a[50];
scanf("%d",&n);
for(m=0;m<n;m++)
{for(i=0;i<50;i++)
a[i]=0;
scanf("%d%s",&l,a);
for(i=0;i<26;i++)
for(j=0;j<26;j++)
if(a[i]=='A'+j)
{s[j][g[j]]=l,g[j]++;
break;}}
m=0;
for(i=0;i<26;i++)
if(g[i]>m) m=g[i],k=i;
printf(... |
2 | 908 | struct m
{ int no,j;
char a[27];
}
main()
{ int n,k,i,j,no,ath[26]={0},m;
char *t,a[26];
struct m *head,*p1,*p2,*tp,*q;
scanf("%d",&n);
head=(struct m*)calloc(n,L);
for(i=0;i<n;i++)
{ scanf("%d%s",&(head+i)->no,(head+i)->a);
(head+i)->j=0;
for(t=(head+i)->a;*t!='\0';t++)
{
ath[*t-'A']++;... |
2 | 909 | int main()
{
struct book
{
int num;
char writer[26];
}bookn[999];
struct zuozhe
{
char w;
int count;
}zuozhen[26];
int n,i;
scanf("%d",&n);
for(i=0;i<26;i++)
{
zuozhen[i].w='A'+i;
zuozhen[i].count=0;
}
int h=0;
int m,j;
for(i=0;i<n;i++)
{
scanf("%d %s",&bookn[i].num,bookn[i].writer);
m=st... |
2 | 910 |
void main()
{
int a[1000];
char s[1000][30],ch;
int b[30]={0};
int i,k;
int n;
int max=0;
scanf("%d",&n);
for(i=0;i<n;i++)
scanf("%d %s",&a[i],s[i]);
for(i=0;i<n;i++)
for(ch='A';ch<='Z';ch++)
if(strchr(s[i],ch)!=NULL)
b[ch-65]++;
for(i=0;i<=26;i++)
if(b[i]>max)
{
max=b[i]... |
2 | 911 |
void main()
{
int n,i,j,sh[100],a[26]={0},b[26][100];
int max,t,m;
char ch[100][40]={'\0'};
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d %s",&sh[i],ch[i]);
}
for(i=0;i<n;i++)
{
for(j=0;j<40;j++)
{
m=ch[i][j];
if(m>64 && m<91)
{a[m-65]++;b[m-65][a[m-65]]=sh[i];}
}}
max=0;
for(i=0;i<26;i++)... |
2 | 912 | int main()
{
int n;
scanf("%d",&n);
int a[1000]={0},b[1000]={0},c[100]={0},l=0;
char s[1000][100]={0},m[26]={0},p;
int i=0,j=0,k=0,t=0;
for(i=0;i<n;i++)
{
scanf("%d %s",&a[i],s[i]);
}
for(i='A';i<='Z';i++)
{
m[j]=i;
for(t=0;t<n;t++)
{
for(k=0;s[t][k]!='\0';k++)
{
if(s[t][k]==m[j])
{
... |
2 | 913 | int main()
{
char a[1000][27],x;
int m,i,j,k,b[1000],c[26]={0},max=0;
cin>>m;
for(i=0;i<m;i++)
{
cin>>b[i]>>a[i];
int len=strlen(a[i]);
for(j=0;j<len;j++)
c[a[i][j]-'A']++;
}
for(j=0;j<26;j++)
if(max<c[j])
{
max=c[j];
x='A'+j;
}
cout<<x<<endl;
cout<<max<<endl;
for(i=0;i<m;i++)
{
... |
2 | 914 | int a[26][1000];
int ai[26];
void func()
{
int k,i,len;
char str[27];
scanf("%d %s",&k,str);
len=strlen(str);
for(i=0;i<len;i++)
{
a[str[i]-'A'][ai[str[i]-'A']]=k;
ai[str[i]-'A']++;
}
}
int main()
{
memset(a,0,sizeof(a));
memset(ai,0,sizeof(ai));
int n,i,i0,max=0;... |
2 | 915 | struct book
{
int id;
char s[L];
int len;
}b[M];
void fun(int count[L],char s[L],int len)
{
int i;
for(i=0;i<len;i++)
{
int m;
m=s[i]-'A';
count[m]++;
}
}
int judge(char s[L],int len,char name)
{
int i,answer=0;
for(i=0;i<len;i++)
{
if(s[i]==name)
{
answer=1;
break;
}
}
return answer;
}
i... |
2 | 916 |
int main(int argc, char* argv[])
{
int m,i,j,len,max;
int id[1000],b[26]={0};
char a[100][27],name;
scanf("%d",&m);
for(i=0;i<m;i++){
scanf("%d %s",&id[i],a[i]);
len=strlen(a[i]);
for(j=0;j<len;j++){
b[a[i][j]-'A']++;
}
}//??????????????????????????
max=b[0];name='A';
for(j=1;j<26;j++){
if(... |
2 | 917 | struct Bo{
int num;
char auth[30];
}a[1010];
void main(){
int n,i,j,maxnum=0,max;
int zuozhe[26]={0};
char out;
scanf("%d",&n);
for(i=1;i<=n;i++)
{
scanf("%d %s",&a[i].num,a[i].auth);
for(j=0;j<=strlen(a[i].auth)-1;j++)
zuozhe[a[i].auth[j]-'A']=zuozhe[a[i].auth[j]-'A']+1;
}
for(i=1;i<=25;i++)
if(zu... |
2 | 918 | int main()
{
struct bookinf
{
int code;
char auth[27];
}book[999];
int i,k,m,max=0,num[26];
for (i=0;i<26;i++)
num[i]=0;
scanf("%d", &m);
for (i=0;i<m;i++)
{
scanf ("%d %s", &book[i].code, book[i].auth);
for (k=0;book[i].auth[k]!='\0';k++)
num[book[i].auth[k]-'A']+=1;
}
for (i=1;i<26;i++)
{
i... |
2 | 919 |
struct
{
int a;
char b[26];
}shu[1000];
int main()
{
int s[27];
int n,i,j,o,max,t=1,x;
scanf("%d",&n);
for (i=0;i<n;i++)
scanf("%d %s",&shu[i].a,shu[i].b);
for (i=1;i<=26;i++)
s[i]=0;
for (i=0;i<n;i++)
for (j=0;j<strlen(shu[i].b);j++)
{
o=shu[i].b[j]-64;
s[o]++;
}
max=0;
for(i=1;i<=26;i+... |
2 | 920 | int main()
{
int m, a, i, j, k, n, s[26][999] = {0}, p[26] = {0};
char b[26], c;
cin >> m;
for(i = 0; i < m; i++)
{
cin >> j;
cin >> b;
n = strlen(b);
for(k = 0; k < n; k++)
{
a = b[k] - 'A';
s[a][p[a]] = j;
p[a] ++;
}
}
j = 0;
for(i = 1; i < 26; i++)
{
if(p[j] < p[i])
j = i;
}
c = ... |
2 | 921 |
int main()
{
int *p;
char q[1000][30];
int shu[26]={0};
char zm[]={'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};
int n,i,j,k;
int len,max=0;
scanf("%d",&n);
p=(int*)malloc(sizeof(int)*n);
for(i=0;i<n;i++)
{
len=0;
scanf("%d %s", &p[i],q[i]);
... |
2 | 922 |
int main()
{
int m;
cin>>m;
int num[1001];
char name[1001][27];
for(int i=0;i<m;++i)
{
cin>>num[i];
cin.get();
cin.getline(name[i],27);
}
int count[100];memset(count, 0, sizeof(count));
int record[27][1000];
int start=0;
int i,j;
char call;
for( i=0;i<m;i++)
{
for( j=0;j<strlen(name... |
2 | 923 |
struct book{
int num;
char author[26];
};
char max(int *p);
int main()
{
int m,b,i,*p;
struct book shu[999];
char c;
int writer[26];
scanf("%d",&m);
for(i=0;i<m;i++){
scanf("%d%s",&shu[i].num,shu[i].author);
}
for(c='A',writer[c-'A']=0;c<='Z';c++){
writer[c-'A']=0;
for(i=0;i<m;i++){
for(b=0;shu[i].... |
2 | 924 |
int main(int argc, char* argv[])
{
int n,i,j,m,b=0,max;
int let[26]={0};
char a;
struct student{
int num;
char name[26];
}book[999];
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d%s",&book[i].num,&book[i].name);
}
for(i=0;i<n;i++){
m=strlen(book[i].name);
for(j=0;j<m;j++){
let[book[i].name[j]-'A']++... |
2 | 925 |
void main()
{
struct book
{
char num[20];
char ren[30];
struct book *next;
};
int n;
int a[26]={0};
struct book *head,*p1,*p2;
int i,j;
char tem;
char b[100][30];
p1=(struct book *)malloc(L);
head=p1;
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%s%s",p1->num,p1->ren);
p2=p1;
p1=(struct book... |
2 | 926 |
int main()
{
int n;
scanf("%d",&n);
struct book{
int booknumber;
char writer[27];
}book[999];
int i;
for(i=0;i<n;i++)
{
scanf("%d %s",&book[i].booknumber,book[i].writer);
}
int writerbookquantity[26];
for(i=0;i<26;i++)writerbookquantity[i]=0;
int j,len,x;
for(i=0;i<n;i++)
{
len=strlen(book[i... |
2 | 927 | int n;
struct stu
{int num;
char name[27];
struct stu *next;
};
struct stu *creat()
{int i=0; struct stu *head, *p1,*p2;
head=p1=p2=(struct stu*)malloc(sizeof(struct stu));
scanf("%d %s", &p2->num,p2->name);
while(i<n-1)
{i++; p2=(struct stu*)malloc(sizeof(struct stu));
scanf("%d %s", &p2->num,p2->name);
p1->next=p2;
... |
2 | 928 | int main()
{
int A[100],C[26]={0},n,i,j,m,a=0,b;
char B[100][100],c;
scanf("%d",&n);
for (i=0;i<n;i++)
{
scanf("%d%s",&A[i],B[i]);
}
for (i=0;i<n;i++)
{
for (j=0;j<strlen(B[i]);j++)
{
m=B[i][j];
C[m-65]++;
}
}
for (i=0;i<26;i++)
{
if (a<C[i])
{
a=C[i];
b=i;
}
}
printf("%c\n",b+65)... |
2 | 929 | void main()
{
struct x
{
char num[26];
int y;
}q[1000],x0;
int n,i,j,c[100]={0},m=0,f;
scanf("%d",&n);
for(i=0;i<n;i++)
{scanf("%d %s",&q[i].y,&q[i].num);}
for(i=0;i<n;i++)
for(j=0;q[i].num[j]!='\0';j++)
m=(int)q[i].num[j],c[m]=c[m]+1;
for(m=0;m<100;m++)
if(c[m]>c[0])
f=m,c[0]=c[... |
2 | 930 | int m;
struct book
{
char num[20];
char aut[20];
struct book*next;
};
struct book*creat()
{
struct book*head,*p1,*p2;
int i;
p1=(struct book*)malloc(LEN);
scanf("%s %s",p1->num,p1->aut);
p1->next=NULL;
head=p1;
p2=p1;
for(i=1;i<m;i++)
{
p1=(struct book*)malloc(LEN);
scanf("%s %s",p1->num,p1->aut);
... |
2 | 931 | struct book
{
int number;
char author[26];
struct book *next;
};
int m,i;
struct book *creat(void)
{
struct book *head,*p1,*p2;
int i=1;
p1=p2=(struct book *)malloc(sizeof(struct book));
head=p1;
for(i=1;i<m;i++)
{
scanf("%d %s",&p1->number,p1->author);
p1=(struct book *)malloc(sizeof(struct book));
p... |
2 | 932 | struct student
{
int num;
char str[27];
struct student *next;
};
int n;
struct student *creat(int m)
{
struct student *head;
struct student *p1,*p2;
p1=p2=(struct student*)malloc(LEN);
scanf("%ld %s",&p1->num,p1->str);
n=1;
head=0;
while(n<m)
{
if(n==1)head=p1;
else p2->next=p1;
p2=p1;
p1=(struct s... |
2 | 933 | void main()
{
int b[1000],d[1000],e[30]={0};
int i,j,k,n,t=0,max;
char c[1000][10];
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d %s",&b[i],c[i]);
d[i]=(int)strlen(c[i]);
}
for(i=0;i<n;i++)
for(j=0;j<d[i];j++)
for(k=0;k<26;k++)
if(c[i][j]==k+65)e[k]=e[k]+1;
max=e[0];
for(k=1;k<26;k++)
... |
2 | 934 | struct book
{
int num;
char writer[26];
}book[1000];
void main()
{
int n,i,j,e,max=0;
scanf("%d",&n);
char da,c;
int temp[27]={0};
for(i=0;i<n;i++)
{
scanf("%d%s",&book[i].num,book[i].writer);
}
for(i=0;i<n;i++)
{
for(da='A';da<='Z';da++)
{
for(j=0;j<26;j++)
{
if(book[i].writer[j]==da)
... |
2 | 935 |
struct shu
{
int haoma;
char b[26];
struct shu *next;
};
int main()
{
int n,i,a[26],c[26][100],max;
int *s,(*q)[100];
s=a;
q=c;
char m[26];
struct shu *head,*p;
for(i=0;i<26;i++)
a[i]=0;
scanf("%d",&n);
head=(struct shu *)malloc(n*sizeof(shu));
p=head;
for(i=0;i<n-1;i++)
{
(p+i)->next=p+i+... |
2 | 936 | int main()
{
int m, b, book[1000][27] = {0}, writer[26] = {0}, max = 0;
char w;
cin >> m;
for(int i = 1; i <= m; i++)
{
cin >> b;
book[i][26] = b;
cin.get();
while((w = cin.get()) != '\n')
{
writer[w - 'A']++;
book[i][w - 'A'] = 1;
}
}
for(int i = 1; i < 26; i++)
if(writer[max] < writer[i])
... |
2 | 937 | struct xinxi
{
int sh;
char zz[20];
}a[1000];
void main()
{
int n,i,l,j,b[26]={0},m=0,k=0;
char c;
scanf("%d",&n);
for(i=0;i<n;i++)
scanf("%d%s",&a[i].sh,a[i].zz);
for(i=0;i<n;i++)
{
l=strlen(a[i].zz);
for(j=0;j<l;j++)
b[a[i].zz[j]-65]++;
}
for(i=0;i<26;i++)
if(b[i]>m) {m=b[i];k=i;}
c=k+65;
pri... |
2 | 938 | int main()
{
struct writer
{
int num;
char name[20];
struct writer * next;
};
int i,j,k,l,m,z[26]={0},max,n;
struct writer *p1,*p2,*p,*head;
scanf("%d",&n);
head=p1=p2=(struct writer *)malloc(sizeof(struct writer));
scanf("%d %s",&p1->num,&p1->name);
for (i=0;i<n-1;i++)
{
p1=(struct writer *)malloc(si... |
2 | 939 | struct book
{int num;
char str[200];
}bk[1000];
int main()
{
int m,i,l,k,p=0,max,maxl;
int a[200][1000];
int b[200];
scanf("%d",&m);
for(i=0;i<m;i++)
scanf("%d%s",&bk[i].num,bk[i].str);
for(l=0;l<26;l++)
{
for(i=0;i<m;i++)
{
for(k=0;bk[i].str[k]!='\0';k++)
{
if((bk[i]... |
2 | 940 | void main()
{
struct book
{
int num;
char wri[26];
struct book *next;
};
int n,m,i;
scanf("%d",&m);
struct book *head,*p1,*p2;
n=0;
p1=p2=(struct book *)malloc(L);
scanf("%d%s",&p1->num,p1->wri);
head=NULL;
for(i=0;i<m-1;i++)
{
n=n+1;
if(n==1)head=p1;
else p2->next=p1;
p2=p1;
p1=(struct book... |
2 | 941 | struct book
{
int num;
char edt[27];
};
struct total //??????????????
{
char name;
int amount;
};
int main()
{
int m,i,j,k;
struct book bk[1000];
struct total to[27];
scanf("%d",&m);
for(i=0;i<m;i++)
scanf("%d %s",&bk[i].num,bk[i].edt);
for(i=0;i<26;i++)
{
to[i].name='A'+i;//????26???
to[i].amount=0;... |
2 | 942 | int main()
{
int n,i,j,k,w=0;
int maxzm,maxbk=0;
char c1;
int zimu[26]={0};
int lm[100];
struct{
int num;
char a[100];
}book[1000];
scanf("%d",&n);
for(i=0;i<n;i++)
scanf("%d %s",&book[i].num,book[i].a);
for(i=0;i<n;i++)
{
for(j=0;book[i].a[j];j++)
{
for(k=65;k<91;k++)
{
if(book[i].a[j]... |
2 | 943 | struct book
{
int ID;
char author[30];
struct book *next;
};
int n,max=0;
char c;
int num[26]={0};
struct book *create()
{
struct book *head,*p1,*p2;
p1=(struct book*)malloc(LEN);
scanf("%d %s",&p1->ID,p1->author);
head=p1;
p2=p1;
p1->next=NULL;
int i=1;
do
{
if(i==n)break;
p1=(struct book*)mal... |
2 | 944 | int ismax(int l[],int a)
{
int i;
for(i=0;i<26;i++)
{
if(l[i]>l[a]) return(0);
}
return(1);
}
void main()
{
int i,j,k,n,p,l[26]={0};
struct shu
{
int num;
char auth[100];
} book[999];
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d %s",&book[i].num,book[i].auth);
}
for(i=0;i<26;i++)
{
for(j=0;j<n... |
2 | 945 | struct book
{
int num;
char author[27];
struct book *next;
};
void main()
{
int m,i,j,k,a[26],sum=0;
for(j=0;j<26;j++)
a[j]=0;
char aut;
scanf("%d",&m);
struct book *head,*pb1,*pb2;
head=NULL;
for(i=0;i<m;i++)
{
pb1=(struct book*)malloc(sizeof(struct book));
scanf("%d %s",&pb1->num,pb1->author);
for(... |
2 | 946 | int main()
{
int i,j,n,k,c,big=0;
int num[30]={0},a[1000];
char name[1000][20];
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d %s",&a[i],name[i]);
}
for(k=0;k<26;k++)
{
for(i=0;i<n;i++)
{
for(j=0;j<strlen(name[i]);j++)
{
if(name[i][j]==k+... |
2 | 947 | struct book
{
int num;
char writer[27];
struct book *next;
};
int n;
int time[26]={0},max,k;
struct book *create(int m)
{
struct book *head;
struct book *p1,*p2;
n=0;
p1=p2=(struct book *)malloc(LEN);
head=NULL;
while(n<m)
{
scanf("%d %s",&p1->num,p1->writer);
n=n+1;
if(n==1) head=p1;
else p2->next=p... |
2 | 948 | struct book
{
int H;
char writer[26];
}b[max];
int main()
{
int m,i,j,k,sum[26]={0},t,Max,g;
char y;
scanf("%d",&m);
for(i=0;i<m;i++)
{
scanf("%d %s",&b[i].H,b[i].writer);
t=strlen(b[i].writer);
for(j=0;j<t;j++)
{
k=b[i].writer[j]-65;
sum[k]++;
}
}
Max=sum[0];
for(i=0;i<26;i++)
{
if(sum[i]>... |
2 | 949 | struct book
{
int num;
char aut[27];
struct book *next;
};
int n;
struct book *creat(int amount)
{
struct book *head;
struct book *p1,*p2;
n=0;
p1=(struct book *)malloc(sizeof(struct book));
p2=p1;
scanf("%d %s",&p1->num,p1->aut);
while(n<amount-1)
{
n=n+1;
if(n==1)head=p1;
else p2->next=p1;
p2=p1;
... |
2 | 950 | struct book
{int num;
char a[27];
int y;
struct book *next;
};
void main()
{int n,i,j,k,m=0,num,max;
struct book *p1,*p2,*p,*head;
int c[26]={0};
scanf("%d",&n);
head=p1=p2=Z;
for(i=0;i<n;i++)
{p2->next=p1;
p2=p1;
scanf("%d%s",&p2->num,p2->a);
num=strlen(p2->a);
for(j=0;j<num;j++)
c[*(p2->a+j)-65]++;
p1=Z;
}
p2->next=... |
2 | 951 |
int main()
{
int m;
char a[1000][10]={0}; //????
char b[1000][30]; //????
int len[1000]={0}; //?????????
int c[150]={0}; //???????
int max=0; //??????????????
int i,j,k,p,q,r,s; //????
scanf("%d", &m);
for(i=0;i<m;i++)
{
scanf("%s %s", a[i], b[i]);
len[i]=strlen(b[i]);
//printf("%d\n", len... |
2 | 952 | int main()
{
int m,sum[27]={0},max=0,author;
cin>>m;
char str[1000][4],name[1000][27];
for(int i=0;i<m;i++) cin>>str[i]>>name[i];
for(int i=0;i<m;i++){
for(int j=0;j<strlen(name[i]);j++)
sum[name[i][j]-'A']++;
}
for(int i=0;i<26;i++){
if(max<sum[i]){
max=sum[i];
author=i;
}
}
cout<<(char)('A'+au... |
2 | 953 | char name[26]={'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};
int main()
{
int n,t,i,j;
int count[26],max=0;
for(i=0;i<26;i++) count[i]=0;
struct book
{
int num;
char man[26];
} book[999];
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d%s",&book[i].... |
2 | 954 | struct jisuan{
int num;
char name[26];
}book[1000];
int main()
{
int i,j,m,n,k,e;
int count[26]={0},author[26];
scanf("%d",&m);
for(i=0;i<26;i++)
author[i]=65+i;
for(i=0;i<m;i++){
scanf("%d",&book[i].num);
gets(book[i].name);
}
for(i='A';i<='Z';i++){
for(j=0;j<m;j++){
n=strlen(book[j... |
2 | 955 | struct tushu
{
int num;
char name[26];
struct tushu *next;
};
struct tushu *creat(int n)
{
struct tushu *head,*p1,*p2;
p1=p2=(struct tushu *)malloc(LEN);
scanf("%d%s",&p1->num,p1->name);
head=p1;
int i;
for(i=1;i<n;i++)
{
p1=(struct tushu *)malloc(LEN);
scanf("%d%s",&p1->num,p1->name);
p2->next=p1;
p2... |
2 | 956 | struct a
{
int num;
char s[20];
struct a *next;
}
main()
{
int n,i,a[26],b[26]={0},t,j,max;
struct a *p1,*p2,*head;
scanf("%d",&n);
head=p1=(struct a *)malloc(L);
scanf(M,&p1->num,p1->s);
for(i=1;i<n;i++)
{
p2=p1;
p1=(struct a *)malloc(L);
p2->next=p1;
scanf(M,&p1->num,p1->s);
}
p1->next=NULL;
for... |
2 | 957 |
int main()
{
struct {
int num;
char author[26];
}book[1000];
int shu_num[26],i,j,k,n,max,length;
char max_author;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d %s",&book[i].num,book[i].author);
}
for(k=0;k<26;k++){
shu_num[k]=0;
}
for(k=0;k<26;k++){
for(i=0;i<n;i++){
length=strlen(book[i].author);
for(j=0;j<leng... |
2 | 958 | int n;
struct book
{
int num;
char name[20];
struct book *next;
}*p1,*p2;
//????
struct book *creat(void)
{
struct book *head;
int i;
head=0;
p1=0;
p2=0;
scanf("%d",&n);
for(i=1;i<=n;i++)
{
p1=(struct book *)malloc(LEN);
scanf("%d %s",&p1->num,p1->name);
if(head==0)
head=p1;
else
p2->next=p1;
... |
2 | 959 | int main()
{
int num,temp;
int author[27][500]={0,};
char str[1000];
cin>>num;
for(int i=1;i<=num;i++)
{
cin>>temp;
getchar();
cin>>str;
for(int j=0;j<strlen(str);j++)
{
author[str[j]-'A'+1][0]++;
author[str[j]-'A'+1][author[str[j]-... |
2 | 960 | void main()
{
int n,i,j,l,max,p;
int a[1000];
scanf("%d",&n);
struct book
{
int m;
char c[27];
};
struct book b[1000];
for(i=0;i<n;i++)
{
scanf("%d",&b[i].m);
scanf("%s",b[i].c);
}
for(i=0;i<26;i++)
a[i]=0;
for(i=0;i<n;i++)
{
l=strlen(b[i].c);
for(j=0;j<l;j++)
a[b[i].c[j]-'A']++;
}
max=a... |
2 | 961 | struct people
{
int a;
char name[26];
};
void main()
{
struct people pl[1000];
int i,j,k,l=0,n,s,m,max,x[26];
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d %s",&pl[i].a,pl[i].name);
}
for(i=0;i<n;i++)
{
m=strlen(pl[i].name);
for(j=0;j<m;j++)
for(k=0;k<26;k++)
if(k==pl[i].name[j]-'A')
{
... |
2 | 962 |
int c[255];
int main()
{
int i,j,n;
char m = 0;
struct {
int id;
char s[255];
} a[1000];
scanf("%d", &n);
for (i=0;i<n;i++) {
scanf("%d%s", &a[i].id, a[i].s);
for (j=0; a[i].s[j]; j++) {
if (++c[a[i].s[j]] > c[m])
m=a[i].s[j];
}
}
printf("%c\n%d\n", m, c[m]);
for (i=0;i<n;i++) {
if (strchr(a[... |
2 | 963 |
struct
{
int num;
char au[27];
}book[999];
int main()
{
int m,a[26]={0},i,j,t,max=0;
scanf("%d",&m);
for(i=0;i<m;i++)
{
scanf("%d%s",&book[i].num,book[i].au);
int au_n=strlen(book[i].au);
for(j=0;j<au_n;j++)
{
if(book[i].au[j]<=90&&book[i].au[j]>=65)
{
int k=book[i].au[j]-65;
a[k]++;
... |
2 | 964 | struct chain
{
int num;
char name[27];
struct chain *next;
};
void main()
{
int a[26]={0},m,i,j,k,max=0,n;
struct chain *p1,*p2,*head;
scanf("%d",&m);
p2=head=(struct chain *)malloc(LEN);
for(k=0;k<27;k++)
head->name[k]=0;
scanf("%d%s",&head->num,&head->name);
for(k=0;k<strlen(head->name);k++)
{
if(hea... |
2 | 965 | void main()
{
struct b
{int n;
char a[26];
};
struct b b[999];
int m,k,i,j,c[26]={0},p=0,q=0;
char x;
scanf("%d",&m);
for(i=0;i<m;i++)
scanf("%d%s",&b[i].n,&b[i].a);
for(i=0;i<m;i++)
for(j=0;(x=b[i].a[j])!='\0'&&j<26;j++)
c[x-65]++;
k=c[0];
for(i=0;i<26;i++)
if(c[i]>k){k=c[i];p=i;}
printf("%c\n",p+6... |
2 | 966 | int main()
{
int m;
int i, j, a,n;
struct book{
int no;
char name[30];
}book[999];
int author1[30]={0}, author2[30]={0};
char k;
scanf("%d", &m);
for(i=0;i<m;i++)
scanf("%d %s", &book[i].no, &book[i].name);
for(i=0;i<m;i++){
a = strlen(book[i].name);
for(j=0;j<a;j++){
for(k='A';k<='Z';k++){
if... |
2 | 967 | struct book
{
int num;
char w[26];
struct book *next;
};
int c[26],m,i,j=0,max;
struct book *creat(int m)
{
struct book *head,*p1,*p2;
p1=(struct book*)malloc(len);
scanf("%d%s",&p1->num,p1->w);
p1->next=NULL;
p2=p1;
head=p1;
for(i=1;i<m;i++)
{
p1=(struct book*)malloc(len);
scanf("%d%s... |
2 | 968 | int max,n,x,b[30]={0};
struct book
{
int num;
char author[30];
struct book*next;
};
struct book*creat()
{
struct book*head,*p1,*p2;
p2=NULL;
head=(struct book*)malloc(len);
p1=head;
while(n>0)
{
char a[30];int i,j;
p2=p1;
x=0;
scanf("%d%s",&p1->num,&p1->author);
strcpy(a,p1->author);
max=b[0];
f... |
2 | 969 | int main(int argc, char* argv[])
{
int m,i,j,A[26]={0},B[26];
char s;
scanf("%d",&m);
struct book{
int num;
char n[26];
}*book;
book=(struct book*)malloc(sizeof(struct book)*m);
for(i=0;i<m;i++)
{
scanf("%d %s",&book[i].num,book[i].n);
for(j=0;book[i].n[j]!='\0';j++)
{
switch(book[i].n[j])
{
... |
2 | 970 | int n;
struct student
{
int num;
char name[100];
struct student *next;
};
struct student *creat(void)
{
struct student *head;
struct student *p1,*p2;
int i;
p1=(struct student*)malloc(LEN);
scanf("%d",&p1->num);
scanf("%s",p1->name);
p1->next=NULL;
head=p1;
p2=p1;
for(i=1;i<n;i++)
{
p1=(struct student*)... |
2 | 971 | struct book
{
int num;
char name[26];
struct book *next;
};
struct book *creat(int m)
{
struct book *head,*p1,*p2;
p1=(struct book *)malloc(sizeof(struct book));
scanf("%d %s",&p1->num,p1->name);
int i;
for(i=1;i<m;i++)
{
if(i==1) head=p1;
else p2->next=p1;
p2=p1;
p1=(struct book *)malloc(sizeof(struct... |
2 | 972 | struct BOOK
{
int No;
char author[27];
}book[999];
int letter[26]={0};
main()
{
int letter[26]={0};
int count=0;
int m,n,s;
scanf("%d",&m);
int i,j,max;
for(i=0;i<m;i++){
scanf("%d%s",&book[i].No,&book[i].author);
}
for(i=0;i<m;i++){
for(j=0;j<strlen(book[i].author);j++){
n=book[i].author[j]-65;
l... |
2 | 973 | struct Book
{
int number;
char author[30];
};
void main()
{
int max=0,len;
int sum[30]={0};
int m,i,j;
struct Book book[999];
scanf("%d",&m);
for(i=0;i<m;i++)
{
scanf("%d %s",&book[i].number,book[i].author);
len=strlen(book[i].author);
for(j=0;j<len;j++)
sum[book[i].author[j]-65]++;
}
for(i=0;i<26;... |
2 | 974 | void main()
{
int n,i,j,no[1000],shu[26]={0},max=0;
char s[1000][20],c;
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d%s",&no[i],s[i]);
for(j=0;j<strlen(s[i]);j++)
{
shu[s[i][j]-'A']++;
}
}
for(i=0;i<26;i++)
{
if(shu[i]>max)
{
max=shu[i];
c='A'+i;
}
}
printf("%c\n%d\n",c,max);
for(i=0;i<... |
2 | 975 |
int main ()
{
int m, i, j, k, n, max, l, y = 0;
struct book
{
int num;
char aut[26];
}book[1000];
int a[26] = {0};
char b[26] = {'A','B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'z'};
scanf ("%d", &m);
for (i = 0; i < m; i++)
{
s... |
2 | 976 | struct book
{
long int num;
char name[26];
}book[1000];
int main()
{
int m,i,j,r;
int writer[26]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
scanf("%d",&m);
for(i=0;i<m;i++)
{
scanf("%ld ",&book[i].num);
scanf("%s",book[i].name);
}
for(i=0;i<m;i++)
{
r=strlen(book[i].name);
for... |
2 | 977 | int main()
{
struct book
{
int num;
char author[26];
}list[999],*p;
int n;
int count[26]={0};
int i;
char k='A';
int max;
scanf("%d",&n);
for(p=list;p<list+n;p++){
scanf("%d %s",&p->num,p->author);
}
for(p=list;p<list+n;p++){
for(i=0;;i++){
if(p->author[i]=='\0'){
break;
}else{
coun... |
2 | 978 | struct book
{
int num;
char ren[26];
}
main()
{
struct book shu[999];
int m,i,j,k,max=0,p;
int a[26]={0};
scanf("%d",&m);
for(i=0;i<m;i++)
{
scanf("%d %s",&shu[i].num,shu[i].ren);
for(j=0;shu[i].ren[j]!='\0';j++)
for(k=65;k<91;k++)
if(shu[i].ren[j]==k)
a[k-65]++;
}
for(i=0;i<26;i++)
if(max<a[i... |
2 | 979 | int main()
{
char book[1000][20]={'\0'},name[1000][30]={'\0'};
int length,n,i,j,number[30]={0},memory,largest,temp;
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%s %s",book[i],name[i]);
}
for(i=0;i<n;i++)
{
length=strlen(name[i]);
for(j=0;j<length;j++)
{
temp=name[i][j]-'A';
number[temp]+=1;
}
}
... |
2 | 980 |
int main()
{
struct
{
int m;
char s[26];
}p[999];
int i,j,len,n;
int a[26][1000]={0};
int w,t;
scanf("%d\n",&n);
for(i=0;i<n;i++)
{
scanf("%d %s",&p[i].m,p[i].s);
len=strlen(p[i].s);
for(j=0;j<len;j++)
{
t=(p[i].s)[j]-'A';
a[t][0]+=1;
w=a[t][0];
a[t][w]=p[i].m;
... |
2 | 981 |
void main()
{
struct book
{
int number;
char author[10];
};
struct book a[1000];
int i,n,j,count[26]={0},temp,max,index=0;
char c;
scanf("%d",&n);
for(i=0;i<n;i++)
scanf("%d %s",&a[i].number,&a[i].author);
for(i=0;i<n;i++)
for(j=0;a[i].author[j]!='\0';j++)
{ temp=(a[i].author[j])-'A';
... |
2 | 982 | void main()
{
char w[999][26];
char m;
int a[999],c[26];
int i,j,n,t,max;
scanf("%d",&n);
for(i=0;i<=25;i++){
c[i]=0;
}
for(i=0;i<=n-1;i++){
scanf("%d",&a[i]);
scanf("%s",w[i]);
}
for(i=0;i<=n-1;i++){
for(j=0;w[i][j]!='\0';j++){
c[w[i][j]-65]+=1;
}
}
max=c[0];
m=65;
for(i=0;i<=25;i++){
if(c... |
2 | 983 |
int pp[26]={0};
struct st
{
char name[27];
int num;
struct st *next;
};
struct st *creat(int m)
{
struct st *head,*p1,*p2;
int i,j;
p1=(struct st *)malloc(sizeof(struct st));
scanf("%d %s",&p1->num,p1->name);
for (j=0;;j++)
{
if (isupper(p1->name[j])) pp[p1->name[j]-65]++;
else break;
}
p2=p1;
head=... |
2 | 984 | int main()
{
struct books
{
int book;
char writer[20];
}bk[1000];
int n,i,j,m,max,k,maxw=0,flag=0,a[26]={0};
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d %s",&bk[i].book,bk[i].writer);
}
for(i=0;i<n;i++)
{
m=strlen(bk[i].writer);
for(j=0;j<m;j++)
{
k=bk[i].writer[j];
a[k-65]++;
}
}
max=a... |
2 | 985 | void main()
{
struct book
{
int num;
char w[27];
};
struct book b[1000];
int n,i,j,k,c[26]={0},max;
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d%s",&b[i].num,b[i].w);
}
for(i='A';i<='Z';i++)
{
for(j=0;j<n;j++)
{
for(k=0;k<strlen(b[j].w);k++)
{
if(i==b[j].w[k])
{
c[i-65]++;
}
... |
2 | 986 | /*
* most books.cpp
* ??:?????????
* Created on: 2012-12-30
* Author: ???
*/
int main()
{
int m=0,num=0,wnum=0,max=0,i=0,j=0; //??????,??,????,?????
int books[26][30]; //??26??????????
char writer[26],name; //????????
memset(books,0,sizeof(books)); ... |
2 | 987 |
main()
{
struct book
{
int num;
char name[26];
}b[1000];
int m,i,j,n[26]={0},max=0,t;
scanf("%d",&m);
for(i=0;i<m;i++)
{ scanf("%d %s",&b[i].num,b[i].name);
}
for(i=0;i<m;i++)
{
for(j=0;j<strlen(b[i].name);j++)
{ ++n[b[i].name[j]-65];
}
}
for(i=0;i<26;i++)
{
i... |
2 | 988 | struct book
{
int order;
int num;
char writer[26];
}b[1000];
int main()
{
int n,i,j,k,p,q[1000];
scanf("%d",&n);
for(i=0;i<=(n-1);i++)
{
scanf("%d %s",&b[i].num,b[i].writer);
b[i].order=i;
}
char a[26]={'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'}... |
2 | 989 |
int main()
{
int m,i,j;
scanf("%d",&m);
struct Bookinfo
{
int number;
char auther[27];
};
struct Bookinfo a[1000];
for (i=0;i<m;i++)
scanf("%d %s",&a[i].number,a[i].auther);
int count[26]={0},max,record;
for (i=0;i<m;i++)
{
int k;
k=strlen(a[i].auther);
for (j=0;j<k;j++)
{
count[a[i].aut... |
2 | 990 | int main(int argc, char* argv[])
{
int N;
int a[26]={0};
struct book{
int x;
char y[27];
}A[1000];
scanf("%d",&N);
int i,j;
for(i=0;i<N;i++)
{
scanf("%d%s",&A[i].x,A[i].y);
for(j=0;A[i].y[j]!='\0';j++)
{
if(A[i].y[j]=='A')
{
a[0]++;
}
else if(A[i].y[j]=='B')
{
a[1]++;
}... |
2 | 991 | void main()
{
struct book{int num;char author[26];}b[999];
int a[26]={0},n,i,j,k,max=0;
scanf("%d",&n);
for(i=0;i<n;i++)scanf("%d %s",&b[i].num,b[i].author);
for(i=0;i<26;i++)
{
for(j=0;j<n;j++)
{
k=0;
while(b[j].author[k]!='\0')
{if(b[j].author[k]==i+65)a[i]++;
k++;}
}
}
for(i=0;i<26;i++)if(m... |
2 | 992 | struct book
{
int num;
char aut[26];
}b[999];
void main()
{
int i,j,m,n,k,max,p;
int a[26]={0},q[999]={0};
scanf("%d",&m);
for(i=0;i<m;i++)
scanf("%d %s",&b[i].num,b[i].aut);
for(i=0;i<m;i++)
{
n=strlen(b[i].aut);
for(j=0;j<n;j++)
{
k=b[i].aut[j];
a[k-65]++;
}
}
for(i=1,max=a[0],p=0;i<26... |
2 | 993 |
int main()
{
int bkn,m=1,n,i,j;
char bka[30];
struct author
{
int num;
int p[200];
}
a[30];
scanf("%d",&n);
for(i=1;i<27;i++)
a[i].num=0;
for(i=0;i<n;i++)
{
scanf("%d%s",&bkn,bka);
for(j=0;j<strlen(bka);j++)
{
a[bka[j]-64].num++;
a[bka[j]-64].p[a[bka[j]-64].num-1]=bkn;
}
}
for(i=2;i<27... |
2 | 994 | struct shu
{
int hao;
char zuo[26];
struct shu*next;
};
int main()
{
int m,a[26]={0},i,j,b[26][1000],k,max;
struct shu*p1,*p2,*head=NULL,*p;
scanf("%d",&m);
p1=p2=(struct shu*)malloc(len);
scanf("%d %s",&p1->hao,p1->zuo);
head=p1;
for(i=2;i<=m;i++)
{
p1=(struct shu*)malloc(len);
scanf("%d %s",&p1->hao... |
2 | 995 | struct worker
{
int nm;
char name1[26];
struct worker *next;
};
struct zuozhe
{
char nam;
int counts;
int name[1000];
struct zuozhe *next;
};
struct worker *creat1(int n)
{
struct worker *head,*p1,*p2;
int i;
head=(struct worker *)malloc(sizeof(struct worker));
p1=p2=head;
for(i=0;i<n;i++)
{
p2=p1;
p1... |
2 | 996 | void main()
{
int m,a[1000],l[1000],i,j,k,t,time[26]={0},max,q=0;
char name[26]={'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};
char b[1000][26];
scanf("%d",&m);
for(i=0;i<m;i++)
{
scanf("%d %s",&a[i],b[i]);
l[i]=strlen(b[i]);
}
for(i=0;i<m;i++)
{
... |
2 | 997 | struct Book
{
int id;
char author[26];
int flag;
}book[1000];
int main()
{
int n, i, j, l, max, maxnum;
int num = 0;
int a[26] = {0};
scanf("%d", &n);
for(i = 0; i < n; i++)
{
scanf("%d %s", &book[i].id, book[i].author);
l = strlen(book[i].author);
for(j = 0; j < l; j++)
a[book[i].author[j] - 65]++;
... |
2 | 998 | struct shu
{
char xh[100]; /*??*/
char zz[100];
struct shu * next;
};
int num[26]={0},m;
struct shu *creat(int n)
{
int i=0;
struct shu *p1,*p2,*head;
p1=p2=(struct shu *)malloc(sizeof(struct shu ));
head=0;
while(i<n)
{
i++;
if(i==1)
{
p1->next=0;
head=p1;
}
else
... |
2 | 999 | struct book
{
int num;
char writer[30];
struct book *next;
};
int n;
struct book *creat(void)
{
struct book *head;
struct book *p1,*p2;
int m=0;
p1=p2=(struct book*)malloc(len);
scanf("%d %s",&p1->num,p1->writer);
head=NULL;
while(m<n-1)
{
m++;
if(m==1) head=p1;
else p2->next=p1;
p2=p1;
p1=(struct ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.