1305: 老管家的忠诚(ST表) 摘要:解题思路:ST表预处理时间为o(nlogn),查询时间为o(1),适用于区间最值查询,但不支持在线修改注意事项:参考代码:#include<bits/stdc++.h> using namespac…… 题解列表 2023年05月11日 0 点赞 0 评论 487 浏览 评分:0.0
1275: 吹哨传球 摘要:解题思路: 注意事项:参考代码:#include<bits/stdc++.h> using namespace std; int main() { int n,m; cin>>n>>m;…… 题解列表 2023年05月11日 0 点赞 0 评论 338 浏览 评分:0.0
有一些中国剩余定理背景的数论题 摘要:解题思路:本质上就是判断是否n%i==i-1,1<=i<=m。注意事项:参考代码:#include<bits/stdc++.h>//时间复杂度O(T) using namespace std;int …… 题解列表 2023年05月12日 0 点赞 3 评论 918 浏览 评分:9.9
简单枚举:1636: 蓝桥杯算法训练VIP-整除问题 摘要:```c++ #include using namespace std; int main() { int a,b,factor; cin>>a>>b>>factor;…… 题解列表 2023年05月12日 0 点赞 0 评论 399 浏览 评分:0.0
sizeof的大作用 摘要:```c++ #include using namespace std; int main() { cout…… 题解列表 2023年05月12日 0 点赞 0 评论 508 浏览 评分:0.0
1848: 求输入数据绝对值 摘要:```c++ #include #include #include using namespace std; int main() { double st; whil…… 题解列表 2023年05月12日 0 点赞 0 评论 473 浏览 评分:0.0
最小三个数(排序+输出) 摘要:# 冒泡排序 ```c++ #include using namespace std; void Sort(int*nums,int n) { for(int i = 0;i>n…… 题解列表 2023年05月12日 0 点赞 1 评论 536 浏览 评分:9.9
#C++1190—— 剔除相关数(map) 摘要:解题思路:对输入字符数字num进行排序,判断是否为相关数,记得保留原来的字符数字顺序,此处用tp保存,然后输出;注意事项:此题为多组输入,记得清空统计变量,恢复初始状态,对 string 类保存的数字…… 题解列表 2023年05月12日 0 点赞 0 评论 457 浏览 评分:0.0
应该考虑到判断的先后顺序也会影响到结果 摘要:解题思路:注意事项:参考代码:l2=input()l1=list(l2.split('-'))n=0s=0##print(l1[0]+l1[1]+l1[2])for i in l1[0…… 题解列表 2023年05月12日 0 点赞 0 评论 421 浏览 评分:0.0
蓝桥杯A组C题 摘要:解题思路: 暴力枚举加剪枝只能通过百分之40的样例,剩下的只能通过数论求解或找规律的方式通过。枚举:Math函数sqrt方法开平方求解 x = y²+z², 当 y²-x的开方为整数时count++…… 题解列表 2023年05月12日 0 点赞 0 评论 1461 浏览 评分:9.9