勉强通过测试没办法解决两行两列问题的c++代码 摘要:解题思路:首先确定该题目是属于数据结构中的连通图的遍历问题,想到要使用dfs即深度优先遍历,属于一个递归,回溯和剪枝问题注意事项:要注意递归循环时需要在设置一个数组来标记该点有没有被访问过,否则会出现…… 题解列表 2022年03月15日 0 点赞 1 评论 291 浏览 评分:2.0
我但凡是用一个数据结构一个算法都对不起这道暴力题 摘要:解题思路:注意事项:参考代码:public class Main { public static void main(String[] args) { boolean flag1 = false; …… 题解列表 2022年03月15日 0 点赞 0 评论 428 浏览 评分:9.9
蓝桥杯历届试题-蚂蚁感冒 分情况计算 摘要:解题思路:蚂蚁速度相同,感冒从最开始向两侧扩散感冒蚂蚁两侧 向两侧走的蚂蚁都不会遇到感冒蚂蚁感冒蚂蚁两侧 向感冒蚂蚁走的蚂蚁都会遇到感冒的蚂蚁注意事项:参考代码:import java.util.Sc…… 题解列表 2022年03月15日 0 点赞 0 评论 355 浏览 评分:0.0
编写题解 1454: 蓝桥杯历届试题-蚂蚁感冒 摘要:解题思路:注意事项:参考代码:#include "iostream"#include "algorithm"#include "cmath"#include "vector"using namespa…… 题解列表 2022年03月15日 0 点赞 0 评论 352 浏览 评分:0.0
蓝桥杯基础练习VIP-2n皇后问题 经典八皇后问题,注意细节 摘要:深度优先搜索,按行遍历,每行选取合适点位,先放白皇后,白皇后放完以后再放黑皇后,方法很简单,注意细节!!! ```cpp #include using namespace std; int m…… 题解列表 2022年03月15日 0 点赞 0 评论 566 浏览 评分:9.9
字符串分类统计 摘要:解题思路:这题还是比较简单的,用基础的C语言就可以了参考代码:include <stdio.h>#include <ctype.h>int main(){ int letter = 0,numb…… 题解列表 2022年03月15日 0 点赞 1 评论 237 浏览 评分:7.3
蓝桥杯2013第四届真题打印十字图 二维数组打印图形 摘要:解题思路:定义二维数组找规律赋值注意事项:参考代码:import java.util.Scanner;public class Main { public static void main(St…… 题解列表 2022年03月15日 0 点赞 0 评论 321 浏览 评分:0.0
辗转相除法 摘要:```cpp #include using namespace std; int gcd(int a, int b){ return b ? gcd(b, a % b) : a; …… 题解列表 2022年03月15日 0 点赞 0 评论 265 浏览 评分:0.0
蓝桥杯2020年第十一届省赛真题-成绩统计 摘要:解题思路:注意事项:参考代码:n=int(input()) county=0 countj=0 for i in range(1,n+1): a=int(input()) i…… 题解列表 2022年03月15日 0 点赞 0 评论 414 浏览 评分:0.0
尝除法求约数 摘要:```cpp #include using namespace std; void check(int n){ vectora; for(int i = 1; i n; c…… 题解列表 2022年03月15日 0 点赞 0 评论 356 浏览 评分:0.0