[递归]母牛的故事(c++) 摘要:解题思路:题目告诉递归,那就找规律:1,2,3,4,6,9明显看出f(n)=f(n-1)+f(n-3);(n>4)注意事项:找对规律对递归很重要。参考代码:#include<bits/stdc++.h…… 题解列表 2023年12月10日 0 点赞 0 评论 205 浏览 评分:0.0
校门外的树(c++) 摘要:解题思路:树是连续的可以用数组来存储,根据区间来遍历,更改数组状态。注意事项:用来存储树的数组需要比极限略微大一点的空间,否则会有段错误。参考代码:#include<bits/stdc++.h> #…… 题解列表 2023年12月10日 0 点赞 0 评论 167 浏览 评分:0.0
宏简单作法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#define max a>b?(a>c?a:c):(b>c?b:c)int main(){int a,b,c;scanf("%d%d%…… 题解列表 2023年12月10日 0 点赞 0 评论 163 浏览 评分:0.0
优优优质题解!!!!! 摘要:解题思路:注意事项:参考代码:public static void main(String[] args) { int zimu =0; int shuzi =0; int kong…… 题解列表 2023年12月10日 0 点赞 0 评论 223 浏览 评分:0.0
周末舞会(python) 摘要:解题思路:注意事项:参考代码:def dance_partner(men_count, women_count, dance_count): men_queue = list(range(1, …… 题解列表 2023年12月10日 0 点赞 0 评论 240 浏览 评分:0.0
点和正方形的关系--java语言 摘要:解题思路:①导入②判断关系③输入④输出注意事项:①导入②关系判断参考代码:import java.util.Scanner; public class Main { public stati…… 题解列表 2023年12月10日 0 点赞 0 评论 194 浏览 评分:0.0
注意爆int(错了十几次) 摘要:1. 打表import java.util.Scanner; public class Main { static int N = 1010, mod = 1000000007; …… 题解列表 2023年12月09日 0 点赞 2 评论 1186 浏览 评分:9.9
2919: 奖学金 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h> using namespace std; struct u { int xh; int yv; …… 题解列表 2023年12月09日 0 点赞 0 评论 157 浏览 评分:9.9
1060:同因查找(python) 摘要:解题思路:注意事项:参考代码:for i in range(10,1001): if(i%2==0 and i%3==0 and i%7==0): print(i) …… 题解列表 2023年12月09日 0 点赞 0 评论 171 浏览 评分:0.0
2920: 分数线划定 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h> using namespace std; struct u { string str; int…… 题解列表 2023年12月09日 0 点赞 0 评论 242 浏览 评分:9.9