计算数字位数and逆序和顺序输出 摘要:#include<stdio.h>#include<math.h>int main(){ int n, m, y, i, j, k = 1; …… 题解列表 2025年10月09日 3 点赞 0 评论 1052 浏览 评分:7.0
c++使用bool变量的简便方法 摘要:#include <iostream>using namespace std;int main() { int a; cin >> a; bool con3 = (a % 3 …… 题解列表 2025年10月27日 2 点赞 0 评论 144 浏览 评分:7.0
危险系数 (C++代码) 摘要:#include<iostream> #include<cstring> #include<cstdio> #include<algorithm> using namespace std; …… 题解列表 2017年12月03日 13 点赞 0 评论 1884 浏览 评分:6.9
【能量项链】 (C++代码) 摘要:解题思路:注意事项:参考代码://区间动规 //重点就是将整体划分为区间,小区间之间合并获得大区间//状态转移方程的推导如下//一、将珠子划分为两个珠子一个区间时,这个区间的能量=左边珠子*右边珠子*…… 题解列表 2017年12月31日 0 点赞 0 评论 1963 浏览 评分:6.9
优质题解 IP判断 (C语言代码)思路清晰,详细注释,欢迎参考! 摘要:思路很清晰,见下面代码注释!遇到的是atoi函数的返回值问题,atoi()函数用来将字符串转换成整数(int),其原型为:int atoi (const char * str);函数说明:atoi()…… 题解列表 2018年04月05日 5 点赞 7 评论 4855 浏览 评分:6.9
采药 (C++代码) 摘要:解题思路:01背包问题 本质是建一个 药的序号和时间 的二维数组 写入每一个元素时都分为采与不采这个药 这两种情况得到总价值的最优解就是本元素的值 由于写入一个元素是需要用到前面的元素,故次数组…… 题解列表 2018年05月03日 56 点赞 1 评论 1350 浏览 评分:6.9
蓝桥杯算法训练VIP-阿尔法乘积 (C++代码) 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<iterator>#include<stdio.h>#include<iomanip>#include<string…… 题解列表 2019年03月21日 0 点赞 0 评论 1141 浏览 评分:6.9
蓝桥杯2015年第六届真题-机器人繁殖 (C语言代码) 摘要:解题思路:如题,设原有机器人x个:1年后总数是:(x+(2x-1))=5 + 9 = 14;2年后总数是:(x+(2x-1)+(2(2x-1)-1))=5 + 9 + 17 = 31;n年新生存在数=…… 题解列表 2019年04月06日 0 点赞 1 评论 1114 浏览 评分:6.9
[编程入门]宏定义之闰年判断 (C++代码) 摘要:解题思路: 首先明白什么是闰年 闰年是公历中的名词。闰年分为普通闰年和世纪闰年。 普通闰年:能被4整除但不能被100整除的年份为普通闰年。(如2004年就是闰年,1900年不…… 题解列表 2019年04月16日 0 点赞 1 评论 1664 浏览 评分:6.9
优质题解 信息学奥赛一本通T1173-阶乘和-题解(Java代码) 摘要:根据阶乘递归公式写出来,代码中想填数字的地方,都用BigInteger代替 ![阶乘递归公式](/image_editor_upload/20200107114250_13311.png "阶乘递归…… 题解列表 2020年01月07日 0 点赞 2 评论 1397 浏览 评分:6.9