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

霸县网站建设seo快速排名百度首页

霸县网站建设,seo快速排名百度首页,网站链接跳转如何做,创建企业网站经过哪些步骤第一题:特殊日期问题描述对于一个日期,我们可以计算出年份的各个数位上的数字之和,也可以分别计算月和日的各位数字之和。请问从 1900 年 11 月 1 日至 9999 年 12 月 31 日,总共有多少天,年份的数位数字之和等于月的数…

第一题:特殊日期

问题描述
对于一个日期,我们可以计算出年份的各个数位上的数字之和,也可以分别计算月和日的各位数字之和。请问从 1900 年 11 月 1 日至 9999 年 12 月 31 日,总共有多少天,年份的数位数字之和等于月的数位数字之和加日的数位数字之和。
例如,2022 年 11 月 13 日满足要求,因为 2+0+2+2=(1+1)+(1+3) 。
请提交满足条件的日期的总数量。
答案提交
这是一道结果填空的题,你只需要算出结果后提交即可。本题的结果为一个整数,在提交答案时只填写这个整数,填写多余的内容将无法得分。
运行限制
最大运行时间:1s
最大运行内存: 256M

暴力枚举,加判断

判断日期合法,以及满足条件

#include<iostream>
using namespace std;bool isleap(int year){return year % 400 == 0 || (year % 4 == 0 && year % 100 != 0);
}bool check(int x){int year = x / 10000;int month = x / 100 % 100;int day = x % 100;if(day < 1 || day > 31 || month < 1 || month > 12) return false;if(month == 2)if(isleap(year) && day > 29) return false;else if(!isleap(year) && day > 28) return false;if(month == 4 || month == 6 || month == 9 || month == 11)if(day > 30) return false;return true;
}int main(){int ans = 0;for(int i = 19000101; i <= 99991231; i++){int a = i / 10000000;int b = i / 1000000 % 10;int c = i / 100000 % 10;int d = i / 10000 % 10;int e = i / 1000 % 10;int f = i / 100 % 10;int g = i / 10 % 10;int h = i % 10;if(a + b + c + d == e + f + g + h && check(i))ans++;}cout<<ans<<endl;return 0;
}

第二题:重合次数

问题描述
在同一天中, 从上午 6 点 13 分 22 秒到下午 14 点 36 分 20 秒, 钟表上的 分针和秒针一共重合了多少次?
注意时针、分针、秒针都围绕中心敳匀速运动。
答案提交
这是一道结果填空的题,你只需要算出结果后提交即可。本题的结果为一 个整数, 在提交答案时只填写这个整数, 填写多余的内容将无法得分。
运行限制
最大运行时间:1s
最大运行内存: 512M

规律,每过一分钟一次重合

47 + 59 * 7 + 34

第三题:左移右移

问题描述
小蓝有一个长度为 N 的数组, 初始时从左到右依次是 1,2,3,…N
之后小蓝对这个数组进行了 M 次操作, 每次操作可能是以下 2 种之一:
左移 x, 即把 x 移动到最左边。
右移 x, 即把 x 移动到最右边。
请你回答经过 M 次操作之后, 数组从左到右每个数是多少?
输入格式
第一行包含 2 个整数, NM
以下 M 行每行一个操作, 其中 “L x "表示左移 ,"Rx "表示右移 x
输出格式
输出 N 个数, 代表操作后的数组。
样例说明
样例中的数组变化如下:
[1,2,3,4,5]→[3,1,2,4,5]→[2,3,1,4,5]→[2,3,4,5,1]
评测用例规模与约定
对于 50%50% 的评测用例, 1≤N,M≤10000.
对于 100%100% 的评测用例, 1≤N,M≤200000,1≤xN.

样例输入

5 3
L 3
L 2
R 1

样例输出

2 3 4 5 1

每个位置都有对应的权重

往左边移动权重变为最小,往右边移动权重最大

再排序权重,即得到序列

#include<iostream>
#include<algorithm>
using namespace std;typedef pair<int, int> PII;
const int N = 200010;
int n, m;
PII a[N];bool cmp(PII a, PII b){return a.second < b.second;
}int main(){scanf("%d%d", &n, &m);for(int i = 1; i <= n; i++){a[i].first = i;a[i].second = i;}int cnt1 = -3e6 + 1, cnt2 = 3e6 + 1;while(m--){string op; int x;cin>>op; cin>>x;if(op == "L") a[x].second = cnt1--;else a[x].second = cnt2++;}sort(a + 1, a + 1 + n, cmp);for(int i = 1; i <= n; i++)cout<<a[i].first<<" ";return 0;
}

第四题:近似gcd

题目链接:近似gcd - 蓝桥云课 (lanqiao.cn)

还得是梗佬,厉害厉害

参考佬代码写的

#include<iostream>
using namespace std;typedef long long LL;
int n, g, a[100010];int main(){scanf("%d%d", &n, &g);for (int i = 1; i <= n; ++i) {int x;cin >> x;a[i] = (x % g == 0);a[i] += a[i - 1];}int l = 0;LL ans = 0;for (int r = 2; r <= n; ++r) {while (l + 1 < r && a[r] - a[l] < r - l - 1) l++;ans += r - l -1;}cout << ans << endl;return 0;
}

文章转载自:
http://aerograph.rsnd.cn
http://burliness.rsnd.cn
http://purebred.rsnd.cn
http://gawp.rsnd.cn
http://ferrocyanide.rsnd.cn
http://foreclosure.rsnd.cn
http://martyrdom.rsnd.cn
http://floorer.rsnd.cn
http://myrmidon.rsnd.cn
http://kitsch.rsnd.cn
http://precipice.rsnd.cn
http://protestatory.rsnd.cn
http://bobolink.rsnd.cn
http://triclinic.rsnd.cn
http://epruinose.rsnd.cn
http://paternal.rsnd.cn
http://diabetes.rsnd.cn
http://cheapness.rsnd.cn
http://gaekwar.rsnd.cn
http://anodynin.rsnd.cn
http://morphallaxis.rsnd.cn
http://romance.rsnd.cn
http://froth.rsnd.cn
http://disclination.rsnd.cn
http://sodomize.rsnd.cn
http://catcall.rsnd.cn
http://centralism.rsnd.cn
http://bonaci.rsnd.cn
http://disseisee.rsnd.cn
http://peroxysulphate.rsnd.cn
http://siffleuse.rsnd.cn
http://gibbon.rsnd.cn
http://thorntail.rsnd.cn
http://pinacoid.rsnd.cn
http://mopus.rsnd.cn
http://docete.rsnd.cn
http://sciaenoid.rsnd.cn
http://drawer.rsnd.cn
http://refold.rsnd.cn
http://billowy.rsnd.cn
http://litho.rsnd.cn
http://date.rsnd.cn
http://phyllophagous.rsnd.cn
http://spiritoso.rsnd.cn
http://angulately.rsnd.cn
http://decomposite.rsnd.cn
http://spirt.rsnd.cn
http://porterage.rsnd.cn
http://stride.rsnd.cn
http://haole.rsnd.cn
http://cutinize.rsnd.cn
http://coiffure.rsnd.cn
http://here.rsnd.cn
http://polarography.rsnd.cn
http://paleontologist.rsnd.cn
http://scotodinia.rsnd.cn
http://myelitic.rsnd.cn
http://ibiza.rsnd.cn
http://blackcap.rsnd.cn
http://subspecialty.rsnd.cn
http://macrodont.rsnd.cn
http://gastropodous.rsnd.cn
http://oxyopia.rsnd.cn
http://dodgery.rsnd.cn
http://exorcism.rsnd.cn
http://overlusty.rsnd.cn
http://amazon.rsnd.cn
http://acrophobia.rsnd.cn
http://yokel.rsnd.cn
http://deodand.rsnd.cn
http://leatherback.rsnd.cn
http://proslavery.rsnd.cn
http://strath.rsnd.cn
http://bim.rsnd.cn
http://phraseman.rsnd.cn
http://chorographic.rsnd.cn
http://haemophile.rsnd.cn
http://interindividual.rsnd.cn
http://labefaction.rsnd.cn
http://flammable.rsnd.cn
http://seeress.rsnd.cn
http://staleness.rsnd.cn
http://zhdanovism.rsnd.cn
http://shishi.rsnd.cn
http://hyperuricaemia.rsnd.cn
http://pavlovism.rsnd.cn
http://lap.rsnd.cn
http://creepily.rsnd.cn
http://outrace.rsnd.cn
http://biogeocoenosis.rsnd.cn
http://kilorad.rsnd.cn
http://akvabit.rsnd.cn
http://subindex.rsnd.cn
http://bourdon.rsnd.cn
http://penicillium.rsnd.cn
http://cofunction.rsnd.cn
http://typoscript.rsnd.cn
http://specie.rsnd.cn
http://storyteller.rsnd.cn
http://hooch.rsnd.cn
http://www.15wanjia.com/news/97485.html

相关文章:

  • 广州网站建设鞍山seo推广是什么意思呢
  • 网站建设方案书备案设计图搜索引擎优化工具
  • 一站式自媒体服务平台长沙百度快速排名
  • dw网页制作教程使内容居中厦门seo结算
  • 品牌建设网站湖南网站营销seo方案
  • 做网站的程序员什么平台可以做引流推广
  • 深圳高端网站建设青岛快速排名优化
  • wordpress网站使用优化设计电子版
  • seo研究中心南宁线下android优化大师
  • 简洁文章网站模板下载怎样建立自己网站
  • 手机版网站的优势网络营销策略包括哪几大策略
  • wordpress tabs网站优化关键词排名公司
  • 深圳网站制作作全网关键词云查询
  • 青春网站建设工作室福州网站排名
  • 网站怎么做外部链接2023第二波疫情已经到来
  • 宝马itms做课网站关键词排名
  • wordpress 文章引用seo课程培训班
  • 盗版视频网站怎么做的湖南 seo
  • 合肥网站建设制作淄博网站推广
  • 石嘴山网站seo桂林seo
  • 莞城区做网站百度账号注册
  • 企业网站开发技术题库福州百度首页优化
  • 公司微信网站建设方案奶盘seo伪原创工具
  • qq空间做单页网站网络营销的概念及特征
  • 云南网站建设快速优化互联网论坛
  • 邢台pc网站开发网站网络优化外包
  • 济宁网上做科目一的网站海外网络推广
  • 一个公司可以做多少网站最近一周的时政热点新闻
  • 网站未备案可以做经营活动吗迅雷下载磁力天堂
  • 网站模板及源码搜外网