chenxi16

导航

2020年4月14日 #

PAT (Basic Level) Practice (中文) 1014 福尔摩斯的约会

摘要: 1 #include<cstdio> 2 #include<cstring> 3 using namespace std; 4 const int MAXN = 65; 5 char a[MAXN],b[MAXN]; 6 int main(){ 7 int day,h,m,count=0,len=0 阅读全文

posted @ 2020-04-14 15:05 chenxi16 阅读(139) 评论(0) 推荐(0) 编辑

PAT (Basic Level) Practice (中文) 1013 数素数

摘要: 1 #include<cstdio> 2 #include<cmath> 3 using namespace std; 4 5 const int MAXN = 100000000; 6 int a[MAXN]; 7 bool isprime(int x); 8 int main(){ 9 int 阅读全文

posted @ 2020-04-14 00:37 chenxi16 阅读(161) 评论(0) 推荐(0) 编辑

PAT (Basic Level) Practice (中文) 1012 数字分类

摘要: 1 #include<cstdio> 2 using namespace std; 3 int num[5],sumn[5],n; 4 void init(); 5 void read(); 6 void deal(); 7 int main(){ 8 init(); 9 read(); 10 de 阅读全文

posted @ 2020-04-14 00:13 chenxi16 阅读(111) 评论(0) 推荐(0) 编辑

2020年4月13日 #

PAT (Basic Level) Practice (中文)1011 A+B 和 C

摘要: 1 #include<cstdio> 2 using namespace std; 3 int t; 4 int main(){ 5 long long int a,b,c; 6 scanf("%d",&t); 7 for(int i=1;i<=t;i++){ 8 scanf("%lld %lld 阅读全文

posted @ 2020-04-13 23:49 chenxi16 阅读(85) 评论(0) 推荐(0) 编辑

PAT (Basic Level) Practice (中文) 1010 一元多项式求导

摘要: 1 #include<stdio.h> 2 #define MAXN 100000 3 struct poly{ 4 int exp,var; 5 }; 6 struct poly a[MAXN]; 7 void read(); 8 void deal(); 9 void print(); 10 i 阅读全文

posted @ 2020-04-13 23:41 chenxi16 阅读(120) 评论(0) 推荐(0) 编辑

PAT (Basic Level) Practice (中文) 1009 说反话

摘要: 提交后最后一项本来不通过,但是更改条件后(见注释)结果就成功了,可见不一定单词里边只有A-Z,a-z,还有其他的内容。 1 #include<stdio.h> 2 #include<string.h> 3 #define MAXN 100 4 char a[MAXN]; 5 int main(){ 阅读全文

posted @ 2020-04-13 20:20 chenxi16 阅读(101) 评论(0) 推荐(0) 编辑

1008 数组元素循环右移问题

摘要: 1 #include<stdio.h> 2 #define MAXN 102 3 int n,a[MAXN],m; 4 int main(){ 5 scanf("%d %d",&n,&m); 6 int i,j; 7 for(i=0;i<n;i++) scanf("%d",&a[i]); 8 if( 阅读全文

posted @ 2020-04-13 19:42 chenxi16 阅读(78) 评论(0) 推荐(0) 编辑

数据结构01- 09-排序3 Insertion or Heap Sort

摘要: #include<stdio.h> #define MAXN 102 int A[MAXN],a[MAXN],p[MAXN],n; void read(); void init(int a[]); int test(int a[],int b[]); int insertion_sort(int a 阅读全文

posted @ 2020-04-13 19:25 chenxi16 阅读(121) 评论(0) 推荐(0) 编辑

数据结构01- 09-排序2 Insert or Merge

摘要: 1 #include<stdio.h> 2 #define MAXN 102 3 int n,a[MAXN],p[MAXN],A[MAXN]; 4 void read(); 5 int insertion_sort(); 6 void merge_sort(); 7 void merge_pass( 阅读全文

posted @ 2020-04-13 16:39 chenxi16 阅读(104) 评论(0) 推荐(0) 编辑

2020年4月9日 #

PAT (Basic Level) Practice (中文)1003 我要通过!

摘要: 1 #include<stdio.h> 2 #include<string.h> 3 #define MAXN 101 4 int find(char a[],char c); 5 int test(char a[]); 6 int main(){ 7 int n,i; 8 char a[MAXN] 阅读全文

posted @ 2020-04-09 16:38 chenxi16 阅读(108) 评论(0) 推荐(0) 编辑