随笔分类 -  算法入门经典

摘要:https://blog.csdn.net/qq_45721778/article/details/104560736 阅读全文
posted @ 2022-04-06 19:46 智人心 阅读(24) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #include<cstring> using namespace std; char a[6][6]; int main(){ int i,j,p,q; for(i=0;i<5;i++){ scanf("%s",a[i]); a[i][5] = '\0'; } 阅读全文
posted @ 2021-11-04 09:54 智人心 阅读(27) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #include<cstring> using namespace std; int main(){ char s[100]; scanf("%s",s); int i,j,k,l,len = strlen(s); for(i=1;i<len;i++){ boo 阅读全文
posted @ 2021-11-04 09:25 智人心 阅读(22) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #include<cstring> #include<cmath> using namespace std; int c[10005][10],data[10],tmp_data[10]; int main(){ memset(c,0,sizeof(c)); f 阅读全文
posted @ 2021-11-03 19:02 智人心 阅读(18) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #include<string.h> #include<ctype.h> using namespace std; int main(){ double score = 0,data[] = {12.01,1.008,16.00,14.01}; char dat 阅读全文
posted @ 2021-11-03 16:18 智人心 阅读(122) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #include<string.h> using namespace std; int main(){ char s[85]; scanf("%s",s); int i,j=0,score=0,len = strlen(s); for(i=0;i<len;i++ 阅读全文
posted @ 2021-11-03 15:23 智人心 阅读(15) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #include<string.h> using namespace std; #define maxn 105 int main(){ char s[maxn][maxn]; while(scanf("%s",s[0])==1){ int len = strl 阅读全文
posted @ 2021-11-03 15:03 智人心 阅读(28) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> using namespace std; int data[100005]; int main(){ int j,a[5],temp; for(int i=1;i<=100000;i++){ j = i; temp = i; while(j>0){ temp + 阅读全文
posted @ 2021-11-03 14:27 智人心 阅读(90) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #include<algorithm> #include<string.h> using namespace std; int data[50],target[50]; int number_data[15],number_target[15]; int mai 阅读全文
posted @ 2021-11-03 14:26 智人心 阅读(58) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #include<string.h> #include<ctype.h> using namespace std; const char* rev = "A 3 HIL JM O 2TUVWXY51SE Z 8 "; const char*msg[] = {"n 阅读全文
posted @ 2021-11-03 10:25 智人心 阅读(32) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> using namespace std; int main(){ int i,c; char a[] = {"`1234567890-=qwertyuiop[]\\asdfghjkl;'zxcvbnm,./'"}; while(c=getchar()){ for 阅读全文
posted @ 2021-11-03 08:54 智人心 阅读(48) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #include<string.h> using namespace std; int main(){ bool odd = true; char c; while(c = getchar()){ if(c=='"'){printf("%s",odd?"“":" 阅读全文
posted @ 2021-11-02 16:39 智人心 阅读(41) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #include<string.h> using namespace std; int main(){ char s[8],buf[20]; int abc,de,x,y,z,count = 0; bool ok; scanf("%s",s); for(abc= 阅读全文
posted @ 2021-11-02 16:06 智人心 阅读(36) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #include<string.h> #define maxn 1005 using namespace std; int a[maxn]; int main(){ int n,k,first = 1; memset(a,0,sizeof(a)); scanf( 阅读全文
posted @ 2021-11-02 15:51 智人心 阅读(37) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #define maxn 20 int a[maxn][maxn]; #include<string.h> using namespace std; int main(){ int x,y,tot = 0,n; scanf("%d",&n); tot = a[x 阅读全文
posted @ 2021-11-02 15:51 智人心 阅读(35) 评论(0) 推荐(0) 编辑
摘要:#include<cstdio> #include<cstring> const int maxn = 20; int main(){ int D,I; while(scanf("%d%d",&D,&I)==2){ int k = 1; for(int i=0;i<D-1;i++){ if(I%2) 阅读全文
posted @ 2021-07-20 15:47 智人心 阅读(96) 评论(0) 推荐(0) 编辑
摘要:#include<cstdio> #include<cstring> const int maxd = 20; int s[1<<maxd]; int main(){ int D,I; while(scanf("%d%d",&D,&I)==2){ memset(s,0,sizeof(s)); int 阅读全文
posted @ 2021-07-20 15:46 智人心 阅读(36) 评论(0) 推荐(0) 编辑
摘要:#include<cstdio> const int maxn = 100005; int n,left[maxn],right[maxn]; void link(int L,int R){ right[L] = R; left[R] = L; } void swap(int&X,int&Y){ i 阅读全文
posted @ 2021-07-20 09:41 智人心 阅读(51) 评论(0) 推荐(0) 编辑
摘要:#include<cstdio> #include<cstring> const int maxn = 100005; int last,cur,next[maxn]; char s[maxn]; int main(){ while(scanf("%s",s+1)==1){ int n = strl 阅读全文
posted @ 2021-07-19 08:55 智人心 阅读(43) 评论(0) 推荐(0) 编辑
摘要:#include<iostream> #include<stack> #include<string> using namespace std; struct Matrix{ int a,b; Matrix(int a=0,int b=0):a(a),b(b){} }m[26]; stack<Mat 阅读全文
posted @ 2021-07-19 08:54 智人心 阅读(130) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示