人物相关性分析C++ 摘要:```cpp #include #include #include #include using namespace std; string str; int k; vector a,…… 题解列表 2021年04月08日 0 点赞 0 评论 798 浏览 评分:6.0
c++和c语言都一样 递归解法 摘要:```cpp #include using namespace std; int dp[500][500],array[500][500]; int index; int dfs(int …… 题解列表 2021年04月08日 0 点赞 0 评论 679 浏览 评分:9.9
蓝桥杯2018年第九届真题-倍数问题 DFS+神奇的优化 摘要:解题思路:说明一下哪两个优化,首先我是先给数据从大到小排好序的,如果你在安排第二个数的时候你选择的第一个数还没有最大值的1/3大,你后面选择的两个数必定小于第一个数,因此不可能超过最大值,直接回溯,两…… 题解列表 2021年04月08日 0 点赞 2 评论 730 浏览 评分:6.0
逆向思维+并查集+一个问题? 摘要:解题思路: 逆向思维+并查集注意事项: sort的自定义函数如果判断条件为>=会出错,对sort不了解所以不知道原因是什么?参考代码:/* *国王的烦恼:逆向思维 * 抗议条件:前…… 题解列表 2021年04月08日 0 点赞 2 评论 582 浏览 评分:6.0
很简单的字母移位 摘要:解题思路:根据字母与首字母的距离来判断如何移位。注意事项:没啥困难的参考代码:#include<iostream> using namespace std; int main(int argc, …… 题解列表 2021年04月08日 0 点赞 0 评论 263 浏览 评分:0.0
1912: 蓝桥杯算法提高VIP-盾神与条状项链 C++ STL 解决 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<vector>using namespace std;vector<int> v;int main(){ in…… 题解列表 2021年04月07日 0 点赞 0 评论 667 浏览 评分:0.0
简单的蚂蚁感冒代码,放心看 摘要:先按左右顺序排列。 如果蚂蚁向左走,以它为原点,那么如果左边有向右走的蚂蚁,那只蚂蚁就一定会感冒。而一旦被感染,则右面的向左边走的蚂蚁也会与之前被感染的接触,也会被感染。 向右走同理。如果不明白请…… 题解列表 2021年04月07日 0 点赞 0 评论 905 浏览 评分:9.9
两种代码的对比 摘要:第一种递归:超时50%#include<bits/stdc++.h>using namespace std;int muniu_num(int n){ if(n<=3) return n; retu…… 题解列表 2021年04月07日 0 点赞 1 评论 271 浏览 评分:7.3
文科生的悲哀(使用递归发现规律) 摘要:解题思路:由递归发现规律...注意事项:单单用递归是会超时的!!!参考代码:#include <iostream>using namespace std;int sum = 0;int N;void …… 题解列表 2021年04月07日 0 点赞 0 评论 349 浏览 评分:0.0
回文数 ---简单代码搞定 摘要:首先,说明一下,此题有会有step=0的情况出现,我看好多题解都没有这个情况,所以特此来写一写题解。其次,此题需要考虑10进制以上的进制输入情况有字母,就必须用字符串数组进行。之前因为没考虑到这个老是…… 题解列表 2021年04月07日 0 点赞 0 评论 779 浏览 评分:9.0