C++ 归并排序 摘要: #include #include using namespace std; int main() { int a; cin >> a;//输入整数个数 …… 题解列表 2023年09月13日 0 点赞 0 评论 769 浏览 评分:10.0
猴子吃桃的问题 摘要:解题思路: 从剩下一个桃那天一直反推前一天的桃子数,直到求出第一天桃子总数注意事项:参考代码:#include<iostream> using namespace st…… 题解列表 2023年09月12日 0 点赞 0 评论 464 浏览 评分:0.0
使用pow()函数求幂次方 摘要:解题思路:pow() 方法 double pow (double x,double y);参数说明:x:双精度数。底数y:双精度数。指数返回值:x 的 y 次方的值例如: pow( 3 , 4 ) …… 题解列表 2023年09月12日 0 点赞 0 评论 722 浏览 评分:0.0
有规律的数列求和 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<iomanip> using namespace std; int main() { double m…… 题解列表 2023年09月12日 0 点赞 0 评论 425 浏览 评分:0.0
C++ 数据结构 字符串连接 #include#includeusingnamespacestd;intmain(){stringa,b;stringc[3];for(inti=0;i<3;++i){cin>>a>>b;stringpan;pan=a+b;if(pan.length()>100)pan="ResultStringi 题解列表 2023年09月12日 0 点赞 0 评论 652 浏览 评分:9.9
思路很简单,代码很友好(注释),也很短 摘要:解题思路:1.如果是*直接输出,else就考虑相邻元素,这里的相邻元素是核心,可以先考虑同一行和同一列的相邻元素(曼哈顿距离)abs(i - x) + abs(j - y) < 2 // 上下左右的相…… 题解列表 2023年09月12日 0 点赞 0 评论 552 浏览 评分:9.9
C++ 猴子偷逃问题 //整体思路:反向推理#includeusingnamespacestd;intmain(){intN;ints=1;//表示桃子的数量cin>>N;//表示猴子吃的天数for(inti=1;i 题解列表 2023年09月12日 0 点赞 0 评论 556 浏览 评分:9.9 C语言训练-"水仙花数"问题1 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a,b,c,i; bool p; cin>>…… 题解列表 2023年09月12日 0 点赞 0 评论 502 浏览 评分:8.0 C++ 温度换算 摘要:解题思路:注意事项: 简单编程,注意用float参考代码:#include<bits/stdc++.h> using namespace std; int main() {…… 题解列表 2023年09月10日 0 点赞 0 评论 706 浏览 评分:8.7 按位与(位运算)(菜鸟教程)(基础) 摘要: //按位与:按二进制位进行"与"(&)运算 1100+1111=1100 只有1&1=1,其他都是0;解题思路: 将第z到第y位进行(1<<i)得到1110000 与n进行按位与 …… 题解列表 2023年09月10日 0 点赞 0 评论 822 浏览 评分:6.0 « 12...414415416417418419420...16501651 »
C语言训练-"水仙花数"问题1 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a,b,c,i; bool p; cin>>…… 题解列表 2023年09月12日 0 点赞 0 评论 502 浏览 评分:8.0
C++ 温度换算 摘要:解题思路:注意事项: 简单编程,注意用float参考代码:#include<bits/stdc++.h> using namespace std; int main() {…… 题解列表 2023年09月10日 0 点赞 0 评论 706 浏览 评分:8.7
按位与(位运算)(菜鸟教程)(基础) 摘要: //按位与:按二进制位进行"与"(&)运算 1100+1111=1100 只有1&1=1,其他都是0;解题思路: 将第z到第y位进行(1<<i)得到1110000 与n进行按位与 …… 题解列表 2023年09月10日 0 点赞 0 评论 822 浏览 评分:6.0