简单易懂的猴子吃桃问题 摘要:解题思路:倒推注意事项:参考代码: #include<stdio.h>int main(){ int N,S=1,i; scanf("%d",&N); for(i=1;i<…… 题解列表 2022年10月23日 0 点赞 0 评论 281 浏览 评分:9.9
编写题解 2920: 分数线划定 C 摘要:解题思路:定义结构-输入-冒泡排序-输出注意事项:注意面试分数线和面试分数线对应的那个序号,然后是进去面试的实际人数之间的关系参考代码:#include<stdio.h>#include<math.h…… 题解列表 2022年10月23日 0 点赞 0 评论 591 浏览 评分:9.9
LCA的思想,也就是倍增法,时间复杂度O(Q*logN) 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;#define maxn 100010#define maxq 100010int …… 题解列表 2022年10月23日 0 点赞 0 评论 326 浏览 评分:9.9
用while进行解题,易理解的解题思路 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int x; scanf("%d",&x); int a=0; int b=0; …… 题解列表 2022年10月23日 0 点赞 0 评论 266 浏览 评分:9.9
逆向思维考虑,五行代码解决!!! 摘要:解题思路:首先审题发现要求猴子第一天摘的桃子数,每天吃前一天的(一半+1)个,第N天还剩1个。最后一天是没有吃的,所以往回推第N-1天的桃子为1*2个,第N-2天就是(1*2+1)*2个.......…… 题解列表 2022年10月23日 0 点赞 0 评论 284 浏览 评分:9.9
编写题解 2837: 年龄与疾病 摘要:解题思路:1)定义4个count计数器2)输出%:'%.2f%%'%n注意事项:参考代码:n=int(input()) #病人数目 ages=list(map(int,input()…… 题解列表 2022年10月23日 0 点赞 0 评论 990 浏览 评分:9.9
不知道为什么运行错误 摘要:解题思路:先构建1,2,3,5,8******这个数列存在malloc出来的数组里,再进行后一项除前一项操作注意事项:进行除法,注意强制类型转换,需要对每一个int都转参考代码:#include <s…… 题解列表 2022年10月23日 0 点赞 0 评论 315 浏览 评分:9.9
编写题解 2927: 二分法求函数的零点 摘要:解题思路:主函数-f(x)函数-ok函数循环注意事项: 二分法参考代码:#include<stdio.h>double f(double x);void ok(double a,double b); …… 题解列表 2022年10月23日 0 点赞 0 评论 718 浏览 评分:9.9
编写题解 2846: 统计数字字符个数 摘要:解题思路:str.isdigit(),判断字符是否为数字注意事项:参考代码:n=input() count=0 for i in n: if i.isdigit(): #判断字符是否为数…… 题解列表 2022年10月23日 0 点赞 0 评论 1113 浏览 评分:9.9
简单的数学题 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;typedef long long ll;ll x,y;int main(){ …… 题解列表 2022年10月23日 0 点赞 0 评论 271 浏览 评分:9.9