1101: 循环(c++纯代码) 摘要:这第75行真是把我搞晕了,虽然最后过了,但还是不懂字符数组为啥用gets输入有问题。 ```cpp #include #include using namespace std; int xx…… 题解列表 2022年09月04日 0 点赞 0 评论 928 浏览 评分:6.0
蓝桥杯2022年第十三届省赛-扫雷(dfs+手写哈希)--技巧总结 摘要:## 1.技巧总结 ### 1.1 n进制降维 本题地雷坐标的x,y取值范围过大($$0≤x,y≤10^9$$),如果直接把x,y当作下标会爆数组。因此我们可以通过将二维数对{x,y}看作是一个$…… 题解列表 2022年09月03日 0 点赞 0 评论 2268 浏览 评分:8.9
二级C语言-计负均正(C++版) 摘要:解题思路:根据题意,首先需要定义一个长度为20的数组来保存20个整数,然后定义sum保存所有正数的和,aver保存所有正数的平均值。再定义num保存负数的个数,接着用for循环依次输入20个数(这里为…… 题解列表 2022年09月03日 0 点赞 0 评论 312 浏览 评分:9.9
优质题解 二级C语言-同因查找(C++版) 摘要:解题思路:首先利用for循环依次获取从10到1000之间的所有整数,然后在循环里面进行判断,判断当前的整数是否能同时被2,3,7整除。用%(取余运算符)进行计算,先依次进行判断,计算表达式如下:i%2…… 题解列表 2022年09月03日 0 点赞 2 评论 1517 浏览 评分:7.5
1100: 采药 (c++代码) 摘要:```cpp #include using namespace std; const int maxn=110,tmaxn=1010; int cost[maxn],value[maxn],d…… 题解列表 2022年09月03日 0 点赞 0 评论 405 浏览 评分:9.9
1099: 校门外的树 摘要:```cpp #include #include using namespace std; int main() { char L[10001]; memset(L,0,…… 题解列表 2022年09月03日 0 点赞 0 评论 265 浏览 评分:9.9
二级C语言-进制转换 摘要:解题思路:将十进制数转化为八进制有两种方式一、使用C中的printf函数,用占位符%o输出(%o表示以八进制整数形式输出),代码如下:printf("%o",n);二、使用iostream的格式控制字…… 题解列表 2022年09月02日 0 点赞 0 评论 501 浏览 评分:9.9
编写题解 2780: 奇偶数判断 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<iomanip> using namespace std; int main() { int n…… 题解列表 2022年09月02日 0 点赞 0 评论 602 浏览 评分:7.3
编写题解 2779: 输出绝对值 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<iomanip> using namespace std; int main() { doubl…… 题解列表 2022年09月02日 0 点赞 0 评论 973 浏览 评分:7.3
编写题解 2775: 等差数列末项计算 摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; int main() { int a,b; int n; …… 题解列表 2022年09月02日 0 点赞 0 评论 277 浏览 评分:0.0