![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
pat
尉水风
这个作者很懒,什么都没留下…
展开
-
pat-basic-1029-c语言
#include#includeint main(){ char all[100]={0},lost[100]={0},check[100]={0}; int i,j,k; gets(all); gets(lost); k=0; for(i=0;all[i]!='\0';i++) { if(all[i]>='a'&&all[i] all[i]=原创 2017-02-08 18:11:20 · 273 阅读 · 0 评论 -
pat-advanced-1025
1025. PAT Ranking (25)时间限制200 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueProgramming Ability Test (PAT) is organized by原创 2017-07-22 21:14:10 · 219 阅读 · 0 评论 -
pat-advanced-1033
1033. To Fill or Not to Fill (25)时间限制100 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者ZHANG, GuochuanWith highways available, driv原创 2017-08-06 20:49:19 · 250 阅读 · 0 评论 -
1042. Shuffling Machine
Shuffling is a procedure used to randomize a deck of playing cards. Because standard shuffling techniques are seen as weak, and in order to avoid "inside jobs" where employees collaborate with gambler...原创 2018-04-09 20:12:30 · 89 阅读 · 0 评论 -
1031. Hello World for U
1031. Hello World for U (20) Given any string of N (>=5) characters, you are asked to form the characters into the shape of U. For example, "helloworld" can be printed as:h de ll rl...原创 2018-04-15 19:40:29 · 320 阅读 · 0 评论 -
1019. General Palindromic Number
1019. General Palindromic Number (20) A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number. ...原创 2018-04-15 20:18:20 · 137 阅读 · 0 评论 -
1046. Shortest Distance
1046. Shortest Distance (20) The task is really simple: given N exits on a highway which forms a simple cycle, you are supposed to tell the shortest distance between any pair of exits.Input S...原创 2018-04-10 16:51:45 · 161 阅读 · 0 评论 -
1065. A+B and C (64bit)
1065. A+B and C (64bit) (20) Given three integers A, B and C in [-263, 263], you are supposed to tell whether A+B > C.Input Specification:The first line of the input gives the positive number of t...原创 2018-04-10 18:40:57 · 169 阅读 · 0 评论 -
1001. A+B Format
1001. A+B Format (20)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueCalculate a + b and output the sum in standard原创 2018-04-03 19:01:49 · 129 阅读 · 0 评论 -
1002. A+B for Polynomials
1002. A+B for Polynomials (25)时间限制400 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueThis time, you are supposed to find A+B where A and B are two polynomials.InputEach input file contains one test...原创 2018-04-03 19:12:27 · 98 阅读 · 0 评论 -
1009. Product of Polynomials
1009. Product of Polynomials (25) This time, you are supposed to find A*B where A and B are two polynomials.Input Specification:Each input file contains one test case. Each case occupies 2 li...原创 2018-04-11 08:36:36 · 105 阅读 · 0 评论 -
1011. World Cup Betting
1011. World Cup Betting (20) With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing battles for th...原创 2018-04-11 18:42:41 · 135 阅读 · 0 评论 -
1006. Sign In and Sign Out
1006. Sign In and Sign Out (25) At the beginning of every day, the first person who signs in the computer room will unlock the door, and the last one who signs out will lock the door. Given ...原创 2018-04-12 21:43:24 · 160 阅读 · 0 评论 -
1036. Boys vs Girls
1036. Boys vs Girls (25) This time you are asked to tell the difference between the lowest grade of all the male students and the highest grade of all the female students. Input Specification...原创 2018-04-12 22:09:11 · 134 阅读 · 0 评论 -
pat-basic-1004-c语言
1004. 成绩排名 (20)时间限制400 ms内存限制65536 kB代码长度限制8000 B判题程序Standard作者CHEN, Yue读入n名学生的姓名、学号、成绩,分别输出成绩最高和成绩最低学生的姓名和学号。输入格式:每个测试输入包原创 2017-07-17 19:09:53 · 328 阅读 · 0 评论 -
pat-basic-1049-c语言
找规律#includeint main(){ double ar[100010],sum; int n,i,n1; sum=0; scanf("%d",&n); n1=n; for(i=0;i<n;i++) { scanf("%lf",&ar[i]); } for(i=0;i<n;i++,n1--) { sum+=(i+1)*ar[i]*n1; } prin原创 2017-02-14 08:35:41 · 343 阅读 · 0 评论 -
pat-basic-1028-c语言
#include //一定要初始化 struct form{ char name[10]; int sum; };int main(){ int i,n,count,year,month,day,sum; struct form young={"a",18140906},old={"b",20140906},st; count=0; scanf("%原创 2017-02-08 17:39:25 · 382 阅读 · 0 评论 -
pat-basic-1032-c语言
#includeint main(){ int n,i,j,sc,gr,mark[100010]={0},max; max=0,j=1; scanf("%d",&n); getchar(); for(i=0;i<n;i++) { scanf("%d %d",&sc,&gr); getchar(); mark[sc]+=gr; } for(i=1;i<=n;i++)原创 2017-02-09 10:57:35 · 258 阅读 · 0 评论 -
pat-basic-1033-c语言
#includeint main(){ int i,j; char word[100]={0},str[100010]={0}; gets(word); gets(str); for(i=0;word[i]!='\0';i++) { if(word[i]=='+') { for(j=0;str[j]!='\0';j++) { if(str[j]='A')原创 2017-02-09 11:00:11 · 247 阅读 · 0 评论 -
pat-basic-1036-c语言
#includeint main(){ int i,j,m; char ch; double n,k; scanf("%lf %c",&n,&ch); k=n/2; j=n/2; if(k-j>=0.5) j++; m=j; for(;j>=1;j--) { if(j==m||j==1) { for(i=n;i>=1;i--) putchar(ch);原创 2017-02-10 09:41:14 · 273 阅读 · 0 评论 -
pat-basic-1037-c语言
#includeint main(){ int b1,c1,b2,c2,sum1,sum2,sub; int b3,c3; long int a1,a2,a3; scanf("%ld.%d.%d %ld.%d.%d",&a1,&b1,&c1,&a2,&b2,&c2); sum1=493*a1+29*b1+c1; sum2=493*a2+29*b2+c2; sub=sum2-sum原创 2017-02-10 20:07:54 · 241 阅读 · 0 评论 -
pat-basic-1038-c语言
#includeint main(){ int mark[110]={0},n,i,temp,n1; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%d",&temp); mark[temp]++; } scanf("%d",&n1); for(i=0;i<n1;i++) { scanf("%d",&temp); print原创 2017-02-10 20:53:19 · 293 阅读 · 0 评论 -
pat-basic-1039-c语言
#include //ASC码值 int main(){ int sell[127]={0},i,c,a,b; char ch; c=0,a=0,b=0; while((ch=getchar())!='\n') { a++; sell[ch]++; } while((ch=getchar())!='\n') { b++; sell[ch]--; } for原创 2017-02-11 11:51:07 · 271 阅读 · 0 评论 -
pat-basic-1041-c语言
#includestruct form{ char sn[50]; int test; int exam;} stu[1010];int main(){ int i,n,k,as[1010],j; scanf("%d",&n); getchar(); for(i=0;i<n;i++) { scanf("%s %d %d",stu[i].sn,&stu[i].test,&原创 2017-02-11 22:09:18 · 353 阅读 · 0 评论 -
pat-basic-1042-c语言
#includeint main(){ char str; int i,ch[128]={0},max,maxi; max=0; while((str=getchar())!='\n') { if(str>='A'&&str<='Z') str=str+'a'-'A'; if(str>='a'&&str<='z') ch[str]++; } for(i=0;i原创 2017-02-11 22:40:44 · 284 阅读 · 0 评论 -
pat-basic-1043-c语言
#includeint main(){ int i,P,A,T,e,s,t; char ch,str[100010]={0}; P=0,A=0,T=0,e=0,s=0,t=0; while((ch=getchar())!='\n') { if(ch=='P') P++; if(ch=='A') A++; if(ch=='T') T++; if(ch=='原创 2017-02-12 10:29:59 · 249 阅读 · 0 评论 -
pat-basic-1046-c语言
#includeint main(){ int i,n,a,sa,b,sb,da,db; da=0,db=0; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%d %d %d %d",&sa,&a,&sb,&b); if(a!=sa+sb&&b!=sa+sb) continue; else if(a==sa+sb&&b!=sa+原创 2017-02-13 09:46:14 · 227 阅读 · 0 评论 -
pat-basic-1047-c语言
#includeint main(){ int i,n,team[1010]={0},t,mark,stu,max,maxi; max=-1; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%d-%d %d",&t,&stu,&mark); team[t]+=mark; } for(i=0;i<1010;i++) { if(ma原创 2017-02-13 09:59:04 · 276 阅读 · 0 评论 -
pat-basic-1048-c语言
题目不是很难,但关键是:B的长度小于A时要将B前端补零后再进行加密#include#includeint main(){ char a[110]={0},b[200]={0},c[110]={0},d[200]={0}; int i,j,n,len_a,len_b,cnt,sum; cnt=0,sum=0; scanf("%s %s",a,b); len_a=strlen(原创 2017-02-13 13:34:36 · 320 阅读 · 0 评论 -
1004 Counting Leaves
1004 Counting Leaves (30 分)A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child.Input Specification:Each input file contains on...原创 2018-09-21 19:00:10 · 319 阅读 · 0 评论