蓝桥杯2014年第五届真题-兰顿蚂蚁 dfs解法 摘要:解题思路:还是按照dfs的模板来,只需要控制好蚂蚁的方向就可以,而且还不用回溯.注意事项:参考代码:#include<iostream> #include<algorithm> #include<…… 题解列表 2022年03月28日 0 点赞 0 评论 682 浏览 评分:9.9
编写题解 1173: 计算球体积 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<math.h>#include <iomanip>#define PI 3.1415using namespace …… 题解列表 2022年03月28日 0 点赞 0 评论 710 浏览 评分:9.9
编写题解 1642: 蓝桥杯算法训练VIP-暗恋 动态规划解决 摘要:解题思路: dp[i][j]表示以a[i][j]为右下角形成的最大正方体边长,默认为1,从第二行第二列开始遍历,将a[i][j],分别与a[i - 1][j] , a[i][j - 1]…… 题解列表 2022年03月28日 0 点赞 1 评论 490 浏览 评分:9.9
编写题解 1172: 计算两点间的距离 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<math.h>#include <iomanip>using namespace std;int main(){ …… 题解列表 2022年03月28日 0 点赞 0 评论 616 浏览 评分:0.0
编写题解 1171: 蟠桃记 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int n; while(cin>>n){ …… 题解列表 2022年03月28日 0 点赞 0 评论 672 浏览 评分:0.0
蓝桥杯算法提高VIP-解二元一次方程组(C++)直接法 #include#include#include#include#include#include#include#includeusingnamespacestd;intmain(){longlonga,b,c,d,e,f;cin>>a>>b>>c>>d>>e>>f;doublex=(c*e-f*b) 题解列表 2022年03月28日 0 点赞 0 评论 987 浏览 评分:0.0
蓝桥杯2014年第五届真题-排列序数-全排列解法 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<algorithm> #include<string.h> using namespace std; in…… 题解列表 2022年03月28日 0 点赞 0 评论 674 浏览 评分:9.9
datetime处理日期真是太省心了 ```pythonimportdatetimes=input()#从输入的字符串里把年月日分别搞出来years=int(s[:4])mouths=int(s[4:6])days=int(s[6:])begin=datetime.date(years, 题解列表 2022年03月28日 1 点赞 1 评论 795 浏览 评分:9.0
就很简单的原理 摘要:解题思路:注意事项:参考代# main n = input() n_da = 0 n_xiao = 0 n_number = 0 for i in n: if(i.isdigit(…… 题解列表 2022年03月28日 0 点赞 0 评论 686 浏览 评分:0.0
二维经典DP,一维就不写了 解题思路:先定义dp[i][j]:至第i个a和第j个b的最长子序列写出转换方程,若序列a第i个值==序列b第j个值:dp[i][j]=max(dp[i-1][j-1]+1,dp[i][j]),否则:dp[i][j]=max(dp[i-1][j], 题解列表 2022年03月28日 0 点赞 0 评论 546 浏览 评分:9.9