蓝桥杯算法提高VIP-和最大子序列 (C语言代码)时间复杂度 O(n) 摘要:解题思路:数据的输入就不说了吧;说说核心和思想:贪心加判断比如这么一串数字 3 -2 3 1 -6 7 1 (再来两个变量 thissum 和 …… 题解列表 2018年11月06日 8 点赞 3 评论 829 浏览 评分:8.0
蓝桥杯算法提高VIP-夺宝奇兵 (C语言代码)(优化2:空间) 摘要:解题思路:注意事项:参考代码:#include <cstdio> #include <cstring> #include <string> #include <cmath> #include …… 题解列表 2018年11月06日 1 点赞 0 评论 1008 浏览 评分:8.0
蓝桥杯2017年第八届真题-对局匹配 (C语言代码)-------Five-菜鸟级 摘要:解题思路: 动态规划 有点导弹拦截 的意思 如果 用户积分之间相互有冲突 要想最多人 则需 每隔k积分的用户在线如下图假设每个 积分段的用户 都一样的话 则要么取蓝色积分的用户 要么取红色用户…… 题解列表 2018年11月21日 7 点赞 0 评论 1081 浏览 评分:8.0
蓝桥杯2013年第四届真题-买不到的数目 (C++代码) 摘要:解题思路: 本题首先需要观察数字特点,要找寻最大的不能组成的数,那只需要这样,以4和7举例,从小到大检验每一个数,4,7,8,11,12,14,15,16,18,19,20,21...,然后你会…… 题解列表 2018年11月13日 5 点赞 5 评论 1135 浏览 评分:8.0
统计字符数 (C语言代码)AC 摘要:解题思路:注意事项: 注意数组fg、max_len和t每次置零操作;(不懂可以去掉试试)参考代码:#include <cstdio> #incl… 题解列表 2018年11月15日 6 点赞 0 评论 1270 浏览 评分:8.0
C语言训练-8除不尽的数 (C++代码) 摘要:解题思路: 根据题解,拆解这个数,可以得到此代码:参考代码:#include<bits/stdc++.h> using namespace std; int main(){ int i=…… 题解列表 2018年11月18日 0 点赞 0 评论 969 浏览 评分:8.0
循环 (C语言代码) 摘要:/*过段时间再改吧,先保存下来(小的整数基本没毛病)*/ #include<stdio.h> #include"malloc.h" #include"math.h" int main() {…… 题解列表 2018年11月20日 0 点赞 2 评论 2333 浏览 评分:8.0
哥德巴赫曾猜测 (C语言代码) 摘要:#include<stdio.h> int func(int n); int main() { int n,count=0,half,j; scanf("%d",&n); …… 题解列表 2018年11月24日 2 点赞 0 评论 1144 浏览 评分:8.0
巨大的数 (Java代码) 摘要:解题思路:在Java语言,当计算大数时,会引用BigInteger这个类。从而进行,加、减、乘、除、取余等运算~注意事项:参考代码:import java.math.BigInteger; impo…… 题解列表 2018年11月25日 1 点赞 0 评论 767 浏览 评分:8.0
C语言程序设计教程(第三版)课后习题1.6 (C语言代码) 摘要:解题思路:使用条件运算符“?:”注意事项:“?:”这是对的,不要拆散它们。参考代码:#include<stdio.h>int main(){ int a,b,c; int max; scanf("%d…… 题解列表 2018年11月25日 0 点赞 0 评论 570 浏览 评分:8.0