题解 1088: A+B for Input-Output Practice (IV) 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int main() { int n,i; int sum,a[10]; scanf("%d",&n…… 题解列表 2022年02月22日 0 点赞 0 评论 559 浏览 评分:0.0
贪心求最小值 排序 摘要:# 注意排序性 先排每组元素总和,若相等根据每组前两个元素和,确定大小次序 ``` #include #include using namespace std; const int N…… 题解列表 2022年02月22日 0 点赞 0 评论 604 浏览 评分:9.9
20行代码,轻松解决1072 摘要:解题思路:将每次瓶子换完饮料后的数量归总,只要最后的瓶子数大于2就一直持续操作,最后的瓶子数量为2就在总数上+1。注意事项:不要忘记到0为止,最后得出的输出行数一定少于输入行数参考代码:#includ…… 题解列表 2022年02月22日 0 点赞 0 评论 299 浏览 评分:9.9
蓝桥杯算法提高VIP-陶陶摘苹果2 摘要:解题思路:不管能不能用到小板凳直接站上去再说参考代码:#include<stdio.h> #define h m+30 //直接站上板凳摘 int main() { int n, m, …… 题解列表 2022年02月22日 0 点赞 0 评论 435 浏览 评分:9.9
蓝桥杯2013年第四届真题-核桃的数量(java代码) 摘要:解题思路:他的要求是:1. 各组的核桃数量必须相同2. 各组内必须能平分核桃即在每组核桃数量相同时,一个组里的所有组员都能分到相同数量的核桃。假设核桃有i个,i必须满足条件,i除以每个组的组员个数…… 题解列表 2022年02月22日 0 点赞 0 评论 324 浏览 评分:0.0
编写题解 1221: 数列问题 摘要:解题思路:注意事项:参考代码:ls=[3,4,5]n=int(input())for i in range(n-3): ls.append(ls[-1]+ls[-2]+ls[-3])print(…… 题解列表 2022年02月22日 0 点赞 0 评论 411 浏览 评分:0.0
二分搜索-整数小拼接 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cstdio>#include<algorithm>#include<cmath>#include<cstring>…… 题解列表 2022年02月22日 1 点赞 0 评论 1942 浏览 评分:10.0
编写题解 1219: 数列排序 摘要:解题思路:注意事项:参考代码:n=int(input()) for i in range(n): ls=list(map(int,input().split())) t=ls[0…… 题解列表 2022年02月22日 0 点赞 0 评论 382 浏览 评分:0.0
题解 1087: A+B for Input-Output Practice (III) 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int main() { int a,b,c=0; while(~scanf("%d %d",&a,&b)) …… 题解列表 2022年02月22日 0 点赞 0 评论 565 浏览 评分:0.0
Huffuman树JAVA版本 摘要:解题思路: 直接使用 整形数组 保存数据; 因为要存取 n 个数据 因此哈夫曼生成值有 n-1 次; 因此, 把 i 的循环范围 设置为 [1, arr.length-1] ; 在…… 题解列表 2022年02月22日 0 点赞 0 评论 354 浏览 评分:0.0