标准 A+B for Input-Output Practice (IV) 摘要:解题思路:用数组存放每次结果,再依次输出。注意事项:参考代码:#include<iostream>using namespace std;int main(){ int n; int i=0; int…… 题解列表 2024年03月16日 0 点赞 0 评论 841 浏览 评分:9.9
史上最笨比做法 解题思路:为了达到如题排序输出格式,采用类与容器结合方式,将一个数的最高位设置为排序字段,赋值给类的order属性注意事项:参考代码:classShuSort{public:ShuSort(intnum,intorder){this->m_num=num;this->m_order=order;}in 题解列表 2024年03月16日 0 点赞 0 评论 566 浏览 评分:9.9
编写题解 3073: 字符串匹配问题(strs)——C++ map set,括号匹配总结 摘要:#### 原题链接 [题目 3073: 字符串匹配问题(strs)](https://www.dotcpp.com/oj/problem3073.html "题目 3073: 字符串匹配问题(str…… 题解列表 2024年03月16日 0 点赞 0 评论 829 浏览 评分:9.9
1074: 数字整除(拿50分就够了) 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cstring>#include<cmath>using namespace std;int main(){ …… 题解列表 2024年03月15日 0 点赞 0 评论 747 浏览 评分:9.9
2342: 信息学奥赛一本通T1429-线段 #includeusingnamespacestd;#definelllonglongconstintN=1000009;intn,ans;structE{intl,r;booloperator>n;for(inti=0;i>e[i].l>>e[i].r;}sort(e, 题解列表 2024年03月15日 0 点赞 0 评论 576 浏览 评分:9.9
1072: 汽水瓶 摘要:解题思路: 首先,题目这里说的是每三瓶可以换一瓶,在这里我看到的人第一想法就是,用这个数去除三,得到的数再去除三,这一个反复的过程,但是如果是偶数的话他会多出一瓶,所以我的出的公式是(n/3)+(n%…… 题解列表 2024年03月15日 1 点赞 0 评论 818 浏览 评分:9.9
c++ 二分答案 摘要:解题思路:emmm就是经典的二分答案,但是我有一个案例没通过,不知道哪里有问题,有找到问题的欢迎评论区留言注意事项:参考代码:#include <bits/stdc++.h> using names…… 题解列表 2024年03月15日 0 点赞 0 评论 719 浏览 评分:0.0
蓝桥杯基础练习VIP-分解质因数 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int a , b; cin >> a >> b; f…… 题解列表 2024年03月15日 0 点赞 0 评论 683 浏览 评分:0.0
一个stl也不算的小思路(最大最小值另解 摘要:解题思路:这里和前面的题解思路也都差不多,只是用了*std::min_elemenet求最大最小值注意事项:参考代码:#include<bits/stdc++.h>using namespace st…… 题解列表 2024年03月15日 0 点赞 0 评论 683 浏览 评分:9.9
题目 1282: 公交汽车(培养这类题的感觉) 解题思路://先分别求到1,2,3,。。。15站的min//第15站的min是踩在前面站的min上来的//i=2,k=1;minv=min(minv,dp[1]+pri[1])=min(50000,12+12)=24//因为i>=k,所以还可以继续内循环, 题解列表 2024年03月15日 0 点赞 0 评论 705 浏览 评分:9.9