2022年6月5日
摘要: #include <iostream> using namespace std; string name,bestname; int main() { int i,tmp=0,n,sum=0,max=0,score1,score2,num; bool a,b; char c1,c2; cin >> 阅读全文
posted @ 2022-06-05 14:43 禹城我的家 阅读(452) 评论(0) 推荐(0)
摘要: 1 #include <iostream> 2 using namespace std; 3 string s1,s2; 4 string strlwr(string s) 5 { 6 for(int i=0;i<s.size();i++) 7 { 8 if(s[i]>='A' && s[i]<=' 阅读全文
posted @ 2022-06-05 14:41 禹城我的家 阅读(1726) 评论(0) 推荐(0)
摘要: 1 #include<iostream> 2 #include<string> 3 #include<algorithm> 4 const int N=25; 5 using namespace std; 6 7 string s[N]; 8 int main() 9 { 10 int n; 11 阅读全文
posted @ 2022-06-05 14:40 禹城我的家 阅读(1295) 评论(0) 推荐(0)
摘要: 【题目描述】 过滤多余的空格。一个句子中也许有多个连续空格,过滤掉多余的空格,只留下一个空格。 【输入】 一行,一个字符串(长度不超过200200),句子的头和尾都没有空格。 【输出】 过滤之后的句子。 【输入样例】 Hello world.This is c language. 【输出样例】 He 阅读全文
posted @ 2022-06-05 14:39 禹城我的家 阅读(804) 评论(0) 推荐(0)
摘要: #include<iostream> using namespace std; int main() { char c1,c2; string s; getline(cin,s); cin >> c1 >> c2; for(int i=0;i<s.size();i++) { if(s[i]==c1) 阅读全文
posted @ 2022-06-05 14:38 禹城我的家 阅读(762) 评论(0) 推荐(0)
  2022年5月26日
摘要: #include<stdio.h> #define N 30 int a[N][N]; int main() { int n,count=1,x,y; scanf("%d",&n); a[0][n-1]=1; x=0; y=n-1; while(count<n*n) { while(x+1<n && 阅读全文
posted @ 2022-05-26 19:12 禹城我的家 阅读(1547) 评论(0) 推荐(0)
摘要: #include <iostream> #include <algorithm> using namespace std; string s,t; int main() { getline(cin,s); s=s.substr(0,s.size()-1); t=s; reverse(t.begin( 阅读全文
posted @ 2022-05-26 19:11 禹城我的家 阅读(1625) 评论(0) 推荐(0)
摘要: #include<stdio.h> #define N 30 int a[N][N]; int main() { int i,j,n; scanf("%d",&n); for(i=0;i<n;i++) { a[i][0]=1; a[i][i]=1; } for(i=0;i<n;i++) for(j= 阅读全文
posted @ 2022-05-26 19:10 禹城我的家 阅读(563) 评论(0) 推荐(0)
  2022年5月22日
摘要: #include<iostream> #include<cstdio> #include<cstdlib> #include<cmath> using namespace std; int main() { int a[100][100],n,m; cin>>n>>m; for(int i=1;i< 阅读全文
posted @ 2022-05-22 18:10 禹城我的家 阅读(1126) 评论(0) 推荐(0)
摘要: #include<iostream> #include<cstdio> #include<cstdlib> #include<cmath> using namespace std; int main() { int n,a[30][30]; cin>>n; for(int i=1;i<=n;i++) 阅读全文
posted @ 2022-05-22 17:54 禹城我的家 阅读(1402) 评论(0) 推荐(0)