随笔分类 - 算法入门经典
摘要:https://blog.csdn.net/qq_45721778/article/details/104560736
阅读全文
摘要:#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'; }
阅读全文
摘要:#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
阅读全文
摘要:#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
阅读全文
摘要:#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
阅读全文
摘要:#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++
阅读全文
摘要:#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
阅读全文
摘要:#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 +
阅读全文
摘要:#include<iostream> #include<algorithm> #include<string.h> using namespace std; int data[50],target[50]; int number_data[15],number_target[15]; int mai
阅读全文
摘要:#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
阅读全文
摘要:#include<iostream> using namespace std; int main(){ int i,c; char a[] = {"`1234567890-=qwertyuiop[]\\asdfghjkl;'zxcvbnm,./'"}; while(c=getchar()){ for
阅读全文
摘要:#include<iostream> #include<string.h> using namespace std; int main(){ bool odd = true; char c; while(c = getchar()){ if(c=='"'){printf("%s",odd?"“":"
阅读全文
摘要:#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=
阅读全文
摘要:#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(
阅读全文
摘要:#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
阅读全文
摘要:#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)
阅读全文
摘要:#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
阅读全文
摘要:#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
阅读全文
摘要:#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
阅读全文
摘要:#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
阅读全文