题解 2826: 雇佣兵 摘要:解题思路:根据题目描述来写,由于不知道具体要循环几组,所以用到while循环注意事项:初始体力值是0,雇佣兵必须要先用能量元素恢复体力再进行战斗,所以能量消耗程序和战斗值增加程序不要颠倒顺序然后再判断…… 题解列表 2025年11月28日 1 点赞 0 评论 108 浏览 评分:10.0
[编程入门]数字的处理与判断 摘要:解题思路:注意事项:看网上的那些答案有些太高级不是很好理解,现在给出两个初学就能做的答案代码,方便理解一下。参考代码:第一种(不使用数组方法):#include <stdio.h>int …… 题解列表 2025年11月28日 2 点赞 0 评论 472 浏览 评分:10.0
明明的随机数(c语言桶解) 摘要:解题思路:用桶来排序,每个数字直接设置为一比qsort快桶号设置为1-1000注意事项:参考代码:int main(){ int N; scanf("%d",&N); in…… 题解列表 2025年11月28日 0 点赞 0 评论 134 浏览 评分:0.0
菜药背包问题 摘要:解题思路://背包0-1的问题,核心把“时间”当成背包容量,//“价值”当成物品价值,标准 0-1 背包倒序刷表即可。注意事项:参考代码:#include<stdio.h>#include…… 题解列表 2025年11月28日 0 点赞 0 评论 177 浏览 评分:2.0
2823: 计算分数加减表达式的值 摘要:解题思路:数学题,没那么复杂注意事项:一个公式拿下参考代码:#include <stdio.h>#include <math.h>int main(){ int n; scan…… 题解列表 2025年11月28日 1 点赞 0 评论 92 浏览 评分:10.0
关于先用筛子筛出质数数组的方法 摘要:解题思路:关于先用筛子筛出质数数组的方法注意事项:参考代码:import java.math.BigDecimal;import java.math.RoundingMode;import…… 题解列表 2025年11月27日 0 点赞 0 评论 113 浏览 评分:0.0
慢慢看,慢慢理解,你也能做到。 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int n=0;  …… 题解列表 2025年11月27日 0 点赞 0 评论 207 浏览 评分:0.0
2966基础写法 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cmath>using namespace std;int sushu(int a){ if…… 题解列表 2025年11月27日 0 点赞 0 评论 99 浏览 评分:0.0
1924: 蓝桥杯算法提高VIP-01背包 摘要:解题思路:注意事项:dp[i][j]=max(dp[i-1][j],dp[i-1][j-w[i]]+v[i]); dp[i][j]表示有i个物品传入,背包能装j的…… 题解列表 2025年11月27日 0 点赞 0 评论 148 浏览 评分:0.0
3050: 最长上升子序列 摘要:解题思路:注意事项:dp[j]=max(dp[j],dp[i]+1);参考代码:#include<stdio.h>#include<stdlib.h>int max(int a…… 题解列表 2025年11月27日 0 点赞 0 评论 98 浏览 评分:0.0