当前位置: 首页 > news >正文

可以做长页的网站seo需要培训才能找到工作吗

可以做长页的网站,seo需要培训才能找到工作吗,做动态网站的软件,页面模板下载1.第一个题,大概题目意思是求n句话中最长的单词和最短的单词 这个题目做的有点磕巴,好几年没有写过c/c了,连string的复制都不会写了,哈哈哈,太笨了 后面一点点捡起来,还是写出来了,本身没啥&…

1.第一个题,大概题目意思是求n句话中最长的单词和最短的单词
这个题目做的有点磕巴,好几年没有写过c/c++了,连string的复制都不会写了,哈哈哈,太笨了
后面一点点捡起来,还是写出来了,本身没啥;
第一:整行读入,要自己分单词
第二: 就是复制的时候是浅层copy还是深层copy,这里也忘记那个是深那个是浅了,反正就是一个直接复制地址,一个是复制内容。
粗暴的代码:


#include<vector>
#include<cmath>
#include<cstring>
#include <iostream>
#include<algorithm>
using namespace std;
vector<string> str;
vector<int> str_leng;
int main(){int num;cin >> num;string line;int min_num=10000;int max_num=0;char max_str[1000]="",min_str[1000]="";getline(cin,line);while(num){getline(cin,line);if (1){
//             cout <<num<< line << endl;int len=0;char tmp[1000]="";for (int i=0;i<line.length();i++){if (line[i]!=' '){tmp[len]=line[i];len++;}if(line[i]==' ' | i==line.length()-1){tmp [len]='\0';
//                     cout<<tmp<<" len: "<<len<<endl;if (len>max_num){
//                         cout<<tmp<<endl;max_num=len;strcpy(max_str,tmp);}if(len<min_num){
//                          cout<<"min: "<<tmp<<endl;min_num = len;strcpy(min_str,tmp);}len=0;strcpy(tmp,"");}}}num--;}cout<<max_str<<endl;cout<<min_str<<endl;return 0;
}

2、就是对n个学生进行按成绩从高到低进行排序,成绩重复的按名字字典序从小到大排序
这里就是自己设置一个学生结构体,然后自定义个结构体排序就好了
还可以的代码:

沉默:
#include<iostream>
#include<cstdio>
#include<cmath>
#include<algorithm>
using namespace std;struct student{char  name[20];int score;
};
bool com(const student x,const student y)
{if(x.score==y.score)return x.name<y.name;return x.score>y.score;
}
int main(){int n;cin >>n;student std[30];for(int i=0;i<n;i++){cin >> std[i].name >> std[i].score;}sort(std,std+n,com);for(int i=0;i<n;i++){cout<<std[i].name<<" "<<std[i].score<<endl;}return 0;
}

3题
请添加图片描述
代码:
数学计算题:

#include<iostream>
#include<cstdio>
#include<cmath>
using namespace std;int main(){int n=1;int res=0;int tmp =0;for (int i=0;i<1;i++){tmp = (n+1)*2;n = tmp;}cout<< n<<endl;return 0;
}

请添加图片描述
用队列来表示能生存的数字,被队列抛弃的就是死掉的数字,最后只剩一个数的时候,就是最终答案。

#include<iostream>
#include<cstdio>
#include<cmath>
#include<algorithm>
#include<queue>
using namespace std;
queue<int> q1;
int main(){int n;cin>>n;int id=1;int num=1;q1.push(id);bool flag=false;while(!q1.empty()){if(flag && q1.size()==1){cout<<q1.front()<<endl;return 0;}num++;if (id<n && !flag){id++;}else{flag=true;id=q1.front();q1.pop();}if(num==3){num=0;}else{q1.push(id);}}return 0;
}
http://www.hkea.cn/news/676033/

相关文章:

  • 网站的弹窗是怎么做的谈谈对seo的理解
  • 广州网站制作费用宁波seo外包哪个品牌好
  • 河南高端网站建设广州网站优化页面
  • 企业可以备案几个网站南昌seo实用技巧
  • 网站用什么布局专业网站建设公司
  • 公司网站怎么做分录it培训机构学费一般多少
  • 如何将自己做的网页做成网站绍兴seo
  • 河南省住房与城乡建设厅网站首页怎么做属于自己的网站
  • 移动端网站开发推广效果最好的平台
  • 用二级页面做网站的源代码自助建站系统破解版
  • 网站上怎么做动画广告推广策略包括哪些内容
  • 广州网站优化公司大亚湾发布
  • 广州网站开发招聘百度经验悬赏令
  • 吴江建设局网站郑州粒米seo外包
  • 建设工程合同纠纷与劳务合同纠纷seo培训教程视频
  • 找网站建设公司哪家最好沈阳市网站
  • sh域名做的好的网站什么是营销
  • 网站平台怎么做推广一站式网络推广服务
  • 百度对新网站排名问题兰州seo快速优化报价
  • 网站建设常用代码湘潭网络推广
  • 做网站上传图片一直错误好用搜索引擎排名
  • 钟祥网站建设网络推广的含义
  • 新闻类网站源码青岛官网seo
  • 网站优化哪里可以做百度营销客户端
  • 常德建设局网站北京优化网站方法
  • 用ip做网站优化手机流畅度的软件
  • 为网站添加统计媒介
  • 商业设计网站推荐互联网营销师证书是国家认可的吗
  • 做网站的是干嘛的怎样把自己的产品放到网上销售
  • 品牌型网站制作价格2022年小学生新闻摘抄十条