蓝桥杯2022年第十三届省赛真题-最少刷题数(二分-java) 摘要:解题思路: 时间复杂度:O(N*log(max(A))*logN)二分找需要刷题数目a, 设已经刷了多少题为x,再二分找符合 < a + x - 1 与 > a + x + 1 的人数,根据题目要求比…… 题解列表 2022年10月14日 0 点赞 0 评论 1659 浏览 评分:8.4
很简单的方法 摘要:解题思路:注意事项:参考代码://编制程序,输入n个整数(n从键盘输入,n>0),输出它们的偶数和。#include <stdio.h>int main (){int a=0,b=0,i=0,n=0,…… 题解列表 2022年10月22日 0 点赞 0 评论 528 浏览 评分:8.4
计算线段长度 摘要:解题思路:利用距离公式(Xa-Xb)*(Xa-Xb)+(Ya-Yb)*(Ya-Yb)开根号注意事项:用double,如果是float会错误82 导入#include<math…… 题解列表 2022年10月23日 0 点赞 0 评论 867 浏览 评分:8.4
分段函数(C++) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;#include<cmath>#include <iomanip>int main(){ …… 题解列表 2022年10月24日 0 点赞 0 评论 819 浏览 评分:8.4
与指定数字相同的数的个数 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a[100]={}, x, sum = 0, n; cin >…… 题解列表 2022年11月09日 0 点赞 0 评论 1013 浏览 评分:8.4
python 倒数第二 摘要:解题思路:注意事项:参考代码:n=int(input())for i in range(n): i=int(input()) a=list(map(int,input().split())…… 题解列表 2022年11月11日 0 点赞 8 评论 361 浏览 评分:8.4
(C语言版史上最简单的题解,秒杀大招)买不到的数目 摘要:解题思路:这里我们可以用到一个公式就是a*b-a-b就直接秒杀题目注意事项:点赞,了解更多秒杀大招。参考代码:#include<stdio.h>int main(){ int a,b; s…… 题解列表 2022年11月12日 0 点赞 4 评论 874 浏览 评分:8.4
编写题解 1395: 倒数第二 Python 摘要:解题思路:sort函数注意事项:很简单好吧,不需要注意参考代码:C=int(input())while C!=0: n=int(input()) if n>=2 and n<=10: …… 题解列表 2022年11月14日 0 点赞 9 评论 417 浏览 评分:8.4
Pell数列非递归模式 摘要:解题思路:参照斐波那契数列的通项公式 f[i] = f[i-1] + f[i-2]类似的只需要在f2上*2最后f3%32376即可。注意事项:循环里面的计数要从2开始!参考代码:#include i…… 题解列表 2022年11月22日 0 点赞 0 评论 602 浏览 评分:8.4
1038: [编程入门]宏定义练习之三角形面积 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>#define S(a,b,c) (a+b+c)/2#define AREA(a,b,c) sqrt(s…… 题解列表 2022年11月26日 0 点赞 0 评论 1174 浏览 评分:8.4