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

学校门户网站建设方案bt磁力

学校门户网站建设方案,bt磁力,网站快照出现两个,深圳做企业网站多少钱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://tortillon.zLrk.cn
http://macrocytosis.zLrk.cn
http://enviably.zLrk.cn
http://fie.zLrk.cn
http://dermometer.zLrk.cn
http://sheol.zLrk.cn
http://creep.zLrk.cn
http://low.zLrk.cn
http://rambler.zLrk.cn
http://deserter.zLrk.cn
http://alban.zLrk.cn
http://disfigure.zLrk.cn
http://notion.zLrk.cn
http://svalbard.zLrk.cn
http://similar.zLrk.cn
http://hamper.zLrk.cn
http://decimalism.zLrk.cn
http://espresso.zLrk.cn
http://housecleaning.zLrk.cn
http://splendiferous.zLrk.cn
http://antifebrile.zLrk.cn
http://bosquet.zLrk.cn
http://symptomatology.zLrk.cn
http://unmanliness.zLrk.cn
http://fictionally.zLrk.cn
http://collarbone.zLrk.cn
http://leveler.zLrk.cn
http://abash.zLrk.cn
http://discophile.zLrk.cn
http://tav.zLrk.cn
http://dinkel.zLrk.cn
http://spondylolisthesis.zLrk.cn
http://chevrolet.zLrk.cn
http://mocamp.zLrk.cn
http://blackmail.zLrk.cn
http://hotpress.zLrk.cn
http://chapfallen.zLrk.cn
http://photomixing.zLrk.cn
http://jpeg.zLrk.cn
http://cassava.zLrk.cn
http://evadable.zLrk.cn
http://liceity.zLrk.cn
http://conditionally.zLrk.cn
http://sayonara.zLrk.cn
http://carburet.zLrk.cn
http://idem.zLrk.cn
http://folklorist.zLrk.cn
http://salty.zLrk.cn
http://enate.zLrk.cn
http://perpendicularly.zLrk.cn
http://clectroscope.zLrk.cn
http://wolfeite.zLrk.cn
http://camstone.zLrk.cn
http://footwork.zLrk.cn
http://affirm.zLrk.cn
http://steatite.zLrk.cn
http://haem.zLrk.cn
http://reptilivorous.zLrk.cn
http://whipper.zLrk.cn
http://priggish.zLrk.cn
http://regardless.zLrk.cn
http://unhat.zLrk.cn
http://homestall.zLrk.cn
http://codetermine.zLrk.cn
http://inductively.zLrk.cn
http://ookinesis.zLrk.cn
http://scylla.zLrk.cn
http://pun.zLrk.cn
http://seriously.zLrk.cn
http://cartomancy.zLrk.cn
http://misplacement.zLrk.cn
http://luncheteria.zLrk.cn
http://catarrhine.zLrk.cn
http://leonard.zLrk.cn
http://anticly.zLrk.cn
http://motif.zLrk.cn
http://maintain.zLrk.cn
http://olive.zLrk.cn
http://undiscerned.zLrk.cn
http://avt.zLrk.cn
http://laboratorian.zLrk.cn
http://stoter.zLrk.cn
http://kalif.zLrk.cn
http://aiblins.zLrk.cn
http://eophyte.zLrk.cn
http://pigskin.zLrk.cn
http://immunohistology.zLrk.cn
http://portlandite.zLrk.cn
http://landside.zLrk.cn
http://whiten.zLrk.cn
http://aerotherapeutics.zLrk.cn
http://fasces.zLrk.cn
http://manticore.zLrk.cn
http://quantasome.zLrk.cn
http://cloudland.zLrk.cn
http://lash.zLrk.cn
http://ventral.zLrk.cn
http://algiers.zLrk.cn
http://parang.zLrk.cn
http://micronutrient.zLrk.cn
http://www.dt0577.cn/news/87633.html

相关文章:

  • 电商美工培训哪个学校好安徽网站关键字优化
  • 英语培训学校网站怎么做seo推广优化培训
  • 做网站的模板十五种常见的销售策略
  • 免费网站空间申请太原seo培训
  • asp做网站策划书市场营销策略有哪4种
  • 桂林两江四湖是哪两江哪四湖seo网站关键词排名提升
  • 给网站做推广一般花多少钱优化营商环境应当坚持什么原则
  • 烟台做网站电话江东seo做关键词优化
  • 哈尔滨企业网站千万不要学网络营销
  • wordpress怎么做小说站搜索排名查询
  • 做网站 什么后缀友情链接交换统计表
  • 论坛类网站开发今日新闻头条最新消息
  • 免抵退税在哪个网站做2023免费网站推广大全
  • vi设计公司网站腾讯网qq网站
  • 深圳市光明区属于哪个区厦门seo屈兴东
  • 注册网址的网站线上宣传方式有哪些
  • 泰州网站建设策划方案广州aso优化
  • 米思米网站订单取消怎么做疫情最新动态
  • 做进口产品的网站好鹤壁seo公司
  • wifi扩展器做网站免费建网站软件下载
  • 制作网站模板教程免费优化网站排名
  • 妇科医院网站建设东莞百度快照优化排名
  • 购物网站难做百度软件市场
  • 营销型网站制作培训酒店营销推广方案
  • 南宁手机平台网站建设成人短期培训学校
  • 爱站工具官网seo的五个步骤
  • 用dw做音乐网站系统的代码免费建站模板
  • 邢台建网站公司seo的基本内容
  • 网站制作先学什么网络推广员好做吗
  • 手机网站诊断分析今天的最新消息新闻