问题转换 只计算奇数个数 摘要:一、解题思路: 我的想法是计算数组中奇数的个数,如果奇数的个数为奇数个的话,无论如何都不可能凑出s1、s2均为偶数。反观奇数的个数为偶数的话,总{s1,s2}的个数=2的偶数个数次方*2的(奇数…… 题解列表 2024年03月11日 0 点赞 0 评论 396 浏览 评分:9.9
筛选n以内的完数 c语言 摘要:解题思路:用两个for循环来做,第一个for循环用来从一到n,第二个for循环用来判断是不是素数如果取余为零则说明是因子注意事项:参考代码:#include <stdio.h>int main(){ …… 题解列表 2024年03月11日 0 点赞 0 评论 281 浏览 评分:9.9
用for放高度 摘要:解题思路:注意事项:参考代码:#include<stdio.h>void main(){ int i=0; int apple=0; int hig[10]; int sh; for(;i<10;i+…… 题解列表 2024年03月11日 0 点赞 0 评论 181 浏览 评分:6.0
用python写个bfs 摘要:解题思路:注意事项:参考代码:#飞机降落,bfs枚举T = int(input())sj = [[(0,0,0)] for _ in range(T)]for i in range(T): n …… 题解列表 2024年03月11日 0 点赞 1 评论 497 浏览 评分:9.9
使用c语言类和对象-函数重载练习-比较大小 摘要:解题思路:注意事项:参考代码:#include#include#includevoid compareInt(int a, int b) { int max = a > b ? a : b; …… 题解列表 2024年03月11日 0 点赞 0 评论 561 浏览 评分:9.9
组合数的DFS+剪枝 摘要:``` import java.util.Scanner; public class Main { static int n; static int k; sta…… 题解列表 2024年03月11日 0 点赞 0 评论 371 浏览 评分:0.0
深度搜索DFS 摘要:``` import java.util.Scanner; public class Main { static int N = 10; static int n;/…… 题解列表 2024年03月11日 0 点赞 0 评论 340 浏览 评分:0.0
分解质因数 摘要:解题思路:注意事项:可以不考虑是否是素数,直接对其分解不推荐gotoloop,我只是当时就只想到了gotoloop参考代码:#include<stdio.h>int main(){ long a,b…… 题解列表 2024年03月11日 0 点赞 0 评论 276 浏览 评分:0.0
1037: [编程入门]宏定义的练习(Python) 摘要:解题思路:自定义函数注意事项:区分算数运算符的运用:/ 除 60/10 6 % 取余 10%9 1 参考代码:def much_1(a,b): …… 题解列表 2024年03月11日 0 点赞 0 评论 301 浏览 评分:6.0
2131: 信息学奥赛一本通T1267-01背包问题-动态规划 摘要: #include using namespace std; int main() { int N,M,c[32][2],dp[32][205];…… 题解列表 2024年03月10日 0 点赞 0 评论 230 浏览 评分:0.0