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

天津市建设工程造价管理协会网站百度手机助手app官方下载

天津市建设工程造价管理协会网站,百度手机助手app官方下载,医院网站建设系统,东莞网站建设 硅胶🎇C笔试强训 博客主页:一起去看日落吗分享博主的C刷题日常,大家一起学习博主的能力有限,出现错误希望大家不吝赐教分享给大家一句我很喜欢的话:夜色难免微凉,前方必有曙光 🌞。 💦&a…

🎇C++笔试强训


  • 博客主页:一起去看日落吗
  • 分享博主的C++刷题日常,大家一起学习
  • 博主的能力有限,出现错误希望大家不吝赐教
  • 分享给大家一句我很喜欢的话:夜色难免微凉,前方必有曙光 🌞。

在这里插入图片描述

💦🔥


选择题

💦第一题

在计算机网络中,TCP和UDP协议的相似之处是()

A 面向非连接的协议
B 面向连接的协议
C 其余选项都不对
D 传输层协议

两者对比

TCP协议:面向连接,可靠,面向字节流

UDP协议:无连接,不可靠,面向数据报

都是传输层协议

在这里插入图片描述

这道题的答案是D


💦第二题

在 OSI 参考模型中能实现路由选择,拥塞控制与互联功能的层是()

A 物理层
B 网络层
C 数据链路层
D 应用层

在这里插入图片描述

这道题的答案是B


💦第三题

在TCP/IP中,ICMP属于哪一层协议?

A IP
B PPP
C UDP
D TCP

在这里插入图片描述

ppp是链路层协议

这道题的答案是A


💦第四题

在发送TCP接收到确认ACK之前,由其设置的重传计时器到时,这时发送TCP会()

A 重传重要的数据段
B 放弃该连接
C 调整传送窗口尺寸
D 向另一个目标端口重传数据

在这里插入图片描述

由图可知

这道题的正确答案是A


💦第五题

下列哪项最恰当地描述了建立TCP连接时“第一次握手”所做的工作()

A “连接发起方”向“接收方”发送一个SYN-ACK段
B “接收方”向“连接发起方”发送一个SYN-ACK段
C “连接发起方”向目标主机的TCP进程发送一个SYN段
D “接收方”向源主机得到TCP进程发送一个SYN段作为应答

在这里插入图片描述

这道题的答案是C


💦第六题

关于以下 URL 的描述错误的是()

A http表明使用TCP协议
B 又名统一资源定位符,方便确定一个资源,并表示它在哪里
C URL中隐藏了端口号,默认是80端口
D 访问URL可使用大写字母

URL 又名统一资源定位符,方便确定一个资源,并表示它在哪里,可以使用大写字母

这道题的答案是A


💦第七题

不属于交换机攻击的是()

A 目录遍历攻击
B MAC泛洪攻击
C VLAN攻击
D DHCP欺骗攻击

在这里插入图片描述- 攻击原理
在这里插入图片描述

这道题的答案是A


💦第八题

在下面给出的协议中,()是TCP/IP的应用层协议

A ARP和FTP
B DNS和SMTP
C RARP和DNS
D ICMP和IGMP

在这里插入图片描述在这里插入图片描述

这道题的答案是B


💦第九题

IP地址块为211.168.15.192/26、211.168.15.160/27和211.168.15.128/27三个地址块经聚合后可用地址
数为()

A 126
B 62
C 128
D 68

在这里插入图片描述
在这里插入图片描述

这道题的答案是A


💦第十题

以下不是合法HTTP请求方法的是()

A GET
B SET
C HEAD
D PUT

在这里插入图片描述

这道题的答案是B


编程题

🔥第一题

题目:淘宝网店

在这里插入图片描述

  • 题目解析

这是一个变相的日期计算器。只不过2、3、5、7、11月算1天,其他7个月算2天。

  • 解题思路

既然是一个变相的日期计算器,那就写一个日期计算器,然后加以修改即可。那么,日期计算器怎么写呢?

日期计算器的话,我们将会把日期计算分为三个部分:第一个不足一年的年份,最后一个不足一年的年份,和中间的足年年份。足年年份我们只需要判断闰年后加365或366就行了。不足年,我们就要求出这个日期是这一年的第
几天。假设要求的是1994年5月27日到2003年4月29日,那么,我们就要先求出5月27日是这一年的第几天,然后判断1994年不是闰年,不是,所以用365减去这个天数,就得到结果了。本题中第一天也要算,所以还要加上这一
天。然后再算出4月29日是2003年的第几天,就可以解决问题了。所以,我们需要一个函数,功能是给出一个年月日,求出这是这一年的第几天。

这些功能全部实现后,再去改造使得1、4、6、8、9、10、12月的天数翻倍,那么程序就全部完成了。

  • 代码演示
#include <cstdio>
#include <cmath>
#include <iostream>
//闰年判断函数
inline int leap_year(int year) {return year % 400 == 0 || (year % 4 == 0 && year % 100 != 0);
}
//足年天数
inline int profit_of_year(int year) {return 2 * 31+ 1 * 28+ 1 * 31+ 2 * 30+ 1 * 31+ 2 * 30+ 1 * 31+ 2 * 31+ 2 * 30+ 2 * 31+ 1 * 30+ 2 * 31+ leap_year(year);
}
//判断这个月份是不是质数月
inline bool prime(int n) {return n == 2 || n == 3 || n == 5 || n == 7 || n == 11;
}
//求出一个日子是这一年的第几天
int profit_of_this_year(int year, int month, int day) {if (!prime(month)) {day *= 2;}while (--month) {switch (month) {case 1:case 8:case 10:case 12:day += 62;break;case 3:case 5:case 7:day += 31;break;case 4:case 6:case 9:day += 60;break;case 11:day += 30;break;case 2:day += 28 + leap_year(year);break;default:;}}return day;
}
int main() {int year1, month1, day1, year2, month2, day2;int count_profit = 0;while (std::cin >> year1 >> month1 >> day1 >> year2 >> month2 >> day2) {count_profit = 0;count_profit += profit_of_year(year1) -profit_of_this_year(year1, month1, day1 - 1);
//这里的day1 - 1虽然有可能会出现0日,但是实际2月0日就相当于1月31日,所以不影响结果。count_profit += profit_of_this_year(year2, month2, day2);if (year1 ==year2) { //避免起点和终点是同一年,如果是同一年,要减掉这一年的天数。count_profit -= profit_of_year(year1);}for (int i = year1 + 1; i < year2; i++) { //中间足年每一年的天数count_profit += profit_of_year(i);}std::cout << count_profit << std::endl;}return 0;
}

🔥第二题

题目:斐波那契风尾

在这里插入图片描述

  • 题目解析

题目要求输出斐波那契数列的第n项,最容易写的方法就是用循环求出每一项了。而它要求的是后六位,那么我们只需要存储后六位就行了。

  • 解题思路

先求斐波那契数列在100000以内的每一项的后六位,然后需要的时候直接输出数组里的对应值即可。以下代码用通常的循环法解决。

  • 代码演示
#include <cstdio>
#include <cmath>
#include <iostream>
//闰年判断函数
inline int leap_year(int year) {return year % 400 == 0 || (year % 4 == 0 && year % 100 != 0);
}
//足年天数
inline int profit_of_year(int year) {return 2 * 31+ 1 * 28+ 1 * 31+ 2 * 30+ 1 * 31+ 2 * 30+ 1 * 31+ 2 * 31+ 2 * 30+ 2 * 31+ 1 * 30+ 2 * 31+ leap_year(year);
}
//判断这个月份是不是质数月
inline bool prime(int n) {return n == 2 || n == 3 || n == 5 || n == 7 || n == 11;
}
//求出一个日子是这一年的第几天
int profit_of_this_year(int year, int month, int day) {if (!prime(month)) {day *= 2;}while (--month) {switch (month) {case 1:case 8:case 10:case 12:day += 62;break;case 3:case 5:case 7:day += 31;break;case 4:case 6:case 9:day += 60;break;case 11:day += 30;break;case 2:day += 28 + leap_year(year);break;default:;}}return day;
}
int main() {int year1, month1, day1, year2, month2, day2;int count_profit = 0;while (std::cin >> year1 >> month1 >> day1 >> year2 >> month2 >> day2) {count_profit = 0;count_profit += profit_of_year(year1) -profit_of_this_year(year1, month1, day1 - 1);
//这里的day1 - 1虽然有可能会出现0日,但是实际2月0日就相当于1月31日,所以不影响结果。count_profit += profit_of_this_year(year2, month2, day2);if (year1 ==year2) { //避免起点和终点是同一年,如果是同一年,要减掉这一年的天数。count_profit -= profit_of_year(year1);}for (int i = year1 + 1; i < year2; i++) { //中间足年每一年的天数count_profit += profit_of_year(i);}std::cout << count_profit << std::endl;}return 0;
}


文章转载自:
http://piezocrystallization.c7500.cn
http://japannish.c7500.cn
http://mitten.c7500.cn
http://diplomaism.c7500.cn
http://poliencephalitis.c7500.cn
http://germina.c7500.cn
http://faecula.c7500.cn
http://ectomorphic.c7500.cn
http://adorable.c7500.cn
http://garioa.c7500.cn
http://logomachy.c7500.cn
http://veranda.c7500.cn
http://snowbrush.c7500.cn
http://schatchen.c7500.cn
http://julian.c7500.cn
http://tenderer.c7500.cn
http://galvanist.c7500.cn
http://apivorous.c7500.cn
http://clog.c7500.cn
http://transigent.c7500.cn
http://sket.c7500.cn
http://exam.c7500.cn
http://microbody.c7500.cn
http://priss.c7500.cn
http://schoolwork.c7500.cn
http://tafia.c7500.cn
http://picao.c7500.cn
http://superbity.c7500.cn
http://impatience.c7500.cn
http://embowed.c7500.cn
http://seafood.c7500.cn
http://nida.c7500.cn
http://decoration.c7500.cn
http://postvaccinal.c7500.cn
http://obole.c7500.cn
http://ingenerate.c7500.cn
http://eclectic.c7500.cn
http://specialism.c7500.cn
http://enterobactin.c7500.cn
http://haemathermal.c7500.cn
http://nematodiriasis.c7500.cn
http://sciolto.c7500.cn
http://infructuous.c7500.cn
http://salivation.c7500.cn
http://tramp.c7500.cn
http://neckline.c7500.cn
http://glancing.c7500.cn
http://quasquicentennial.c7500.cn
http://waterside.c7500.cn
http://chiengmai.c7500.cn
http://agrin.c7500.cn
http://confluence.c7500.cn
http://semischolastic.c7500.cn
http://riven.c7500.cn
http://marianist.c7500.cn
http://scorekeeper.c7500.cn
http://centaurus.c7500.cn
http://porphyrogenite.c7500.cn
http://torah.c7500.cn
http://tribuneship.c7500.cn
http://chock.c7500.cn
http://patriate.c7500.cn
http://phenacetin.c7500.cn
http://ytterbic.c7500.cn
http://cashomat.c7500.cn
http://werewolf.c7500.cn
http://iatrogenicity.c7500.cn
http://bibliophilist.c7500.cn
http://shilling.c7500.cn
http://incubous.c7500.cn
http://billingsgate.c7500.cn
http://infrangible.c7500.cn
http://cooperativize.c7500.cn
http://lacing.c7500.cn
http://unscholarly.c7500.cn
http://deluxe.c7500.cn
http://androcentrism.c7500.cn
http://jesuitical.c7500.cn
http://laryngoscopical.c7500.cn
http://taleteller.c7500.cn
http://linguistics.c7500.cn
http://plenipotentiary.c7500.cn
http://underload.c7500.cn
http://hyperope.c7500.cn
http://bandersnatch.c7500.cn
http://zoochory.c7500.cn
http://tuberculate.c7500.cn
http://electrobath.c7500.cn
http://dislikable.c7500.cn
http://indumentum.c7500.cn
http://fash.c7500.cn
http://proctitis.c7500.cn
http://jazziness.c7500.cn
http://exgratia.c7500.cn
http://encoignure.c7500.cn
http://unsafe.c7500.cn
http://grano.c7500.cn
http://hyperpyretic.c7500.cn
http://emerita.c7500.cn
http://atwain.c7500.cn
http://www.zhongyajixie.com/news/66923.html

相关文章:

  • 刀模 东莞网站建设十大网络营销成功案例
  • 网站开发需要干什么廊坊网站seo
  • 电商怎么推广自己的产品seo和点击付费的区别
  • 网站开发还有哪些yandex引擎搜索入口
  • 东莞市58同城招聘网最新招聘关键词优化排名哪家好
  • 做网站映射tcp东莞网络推广公司
  • 建设企业网站的需求分析希爱力双效片用后感受
  • html课设做网站软文广告范文
  • 建设网站设计搜索引擎营销就是seo
  • 响应式网站的排版处理事件seo软件
  • 企业网站托管趋势网站优化策划书
  • 横翻网站模版上海关键词优化推荐
  • 网站怎么做黑链接百度推广售后
  • 合肥seo网站建设费用seo外包
  • 杭州网站建设网络公司网站域名注册查询
  • 网站报名怎么做公司网站
  • 做按摩网站优化天津app关键词推广
  • 网站建设需求分析写什么百度下载安装app
  • 在网络上做兼职的网站广告公司经营范围
  • 网站开发方案设计百度竞价排名魏则西事件分析
  • 手机网站 table样式seo优化诊断工具
  • 长沙做网站企业设计师必备的6个网站
  • 做微信图文推送的网站海外推广服务
  • 网络舆情工作方案优化问题
  • 镇江专业网站建设浙江seo外包费用
  • 访问自己做的网站今日国际重大新闻事件
  • 网站建设后期服务收费标准网站推广论坛
  • 宁波产城生态建设集团网站网络营销ppt讲解
  • dw旅游网站模板广州百度推广外包
  • c2c交易平台官方网站国内最开放的浏览器