第一个带类的C++程序 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ string s,t=""; cin>>s; …… 题解列表 2023年05月12日 0 点赞 0 评论 207 浏览 评分:0.0
#C++1724——后缀子串排序 摘要:解题思路:string类的substr函数求出子串,放入set容器自动排序,定义迭代器遍历即可;注意事项:cout输出会超时,用c_str函数转化为C风格的字符串(迭代器类似于指针,需要“->”去访问…… 题解列表 2023年05月12日 0 点赞 0 评论 352 浏览 评分:9.9
c++去除空格 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;string put(string s){ int n=s.size(); …… 题解列表 2023年05月12日 1 点赞 0 评论 189 浏览 评分:0.0
三位数分解 摘要:```c++ #include #include using namespace std; void Print(int n) { if(n>9) {…… 题解列表 2023年05月12日 0 点赞 0 评论 168 浏览 评分:0.0
#C++1190—— 剔除相关数(map) 摘要:解题思路:对输入字符数字num进行排序,判断是否为相关数,记得保留原来的字符数字顺序,此处用tp保存,然后输出;注意事项:此题为多组输入,记得清空统计变量,恢复初始状态,对 string 类保存的数字…… 题解列表 2023年05月12日 0 点赞 0 评论 207 浏览 评分:0.0
有一些中国剩余定理背景的数论题 摘要:解题思路:本质上就是判断是否n%i==i-1,1<=i<=m。注意事项:参考代码:#include<bits/stdc++.h>//时间复杂度O(T) using namespace std;int …… 题解列表 2023年05月12日 0 点赞 3 评论 646 浏览 评分:9.9
1275: 吹哨传球 摘要:解题思路: 注意事项:参考代码:#include<bits/stdc++.h> using namespace std; int main() { int n,m; cin>>n>>m;…… 题解列表 2023年05月11日 0 点赞 0 评论 156 浏览 评分:0.0
1305: 老管家的忠诚(ST表) 摘要:解题思路:ST表预处理时间为o(nlogn),查询时间为o(1),适用于区间最值查询,但不支持在线修改注意事项:参考代码:#include<bits/stdc++.h> using namespac…… 题解列表 2023年05月11日 0 点赞 0 评论 237 浏览 评分:0.0
边长的判断 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a,b,c; cin>>a>>b>>c; i…… 题解列表 2023年05月11日 0 点赞 0 评论 165 浏览 评分:0.0
判断回文数 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ string s,t=""; cin>>s; …… 题解列表 2023年05月11日 0 点赞 0 评论 210 浏览 评分:0.0