关于 完全背包 的解题思路(C++) 摘要:其实我是以前写01背包时无意中发现完全背包的 -__-#(如果不会01背包,我建议先去学习一下)。什么是完全背包?在01背包中,每件物品可以取一次,而完全背包则是物品可以取无数次(只要背包容量充足)。…… 题解列表 2024年11月18日 0 点赞 0 评论 266 浏览 评分:9.9
1054: 二级C语言-计算素数和(最简单的求法) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;bool add(int n){ int t=1; for(int…… 题解列表 2024年11月18日 0 点赞 0 评论 948 浏览 评分:9.9
这个不是答案!!!但是这个非常好玩,建议去玩一下,增加兴趣 摘要:解题思路:学到后面突然想起来这道题了注意事项:参考代码:#include <stdio.h>int main() { int a,t,x=0; scanf("%d",&a); while(a!=0){…… 题解列表 2024年11月18日 2 点赞 0 评论 382 浏览 评分:9.9
筛排处理,气死我了这题!!! 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; int main(){ // 定义变量a和数组d,其中d的大小为1…… 题解列表 2024年11月18日 0 点赞 1 评论 204 浏览 评分:9.9
质因数分解 不用引用math函数,极简 摘要:解题思路:大体思路相同,都是用平方根计算注意事项:参考代码:#include<stdio.h>int main(){ int n,max; scanf("%d",&n); for(i…… 题解列表 2024年11月18日 2 点赞 0 评论 318 浏览 评分:10.0
应该是最简洁了的-最强小队 摘要:解题思路:题意理解错了,以为是从一段区间中选取几个结果是一整段的,几行搞定注意事项:参考代码:#include<bits/stdc++.h>using namespace std;const int …… 题解列表 2024年11月18日 1 点赞 0 评论 720 浏览 评分:4.0
1796: 蛇形填数 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<string>using namespace std;int n, a[150][150];void twins(i…… 题解列表 2024年11月18日 0 点赞 0 评论 390 浏览 评分:9.9
不懂评论简化 摘要:解题思路:注意事项:参考代码:a=list(map(int,input().split())) for i in range(5): a[i]//=3 up=4 if(i==0)…… 题解列表 2024年11月18日 0 点赞 0 评论 163 浏览 评分:0.0
不懂可评论 摘要:解题思路:注意事项:参考代码:import java.util.Scanner; public class Main { public static void main(String[] arg…… 题解列表 2024年11月18日 0 点赞 0 评论 171 浏览 评分:0.0
信息学奥赛一本通T1616-A 的 B 次方 摘要:参考代码:#include <stdio.h> // 快速幂实现 long long int mod_exp(long long int a, long long int b, long long…… 题解列表 2024年11月18日 0 点赞 0 评论 162 浏览 评分:0.0