题解列表

筛选

Minesweeper (C++代码)

摘要:解题思路:参考代码:#include<bits/stdc++.h> using namespace std;   int  high, width; char Map[103][103]; ……

蓝桥杯算法提高VIP-开灯游戏 (C++代码)

摘要:解题思路:        模拟 + DFS。其中最巧妙的就是如何记录开关的某个组合出现过,当然是 Hash 值啦。参考代码:#include<bits/stdc++.h> /* 一共 112 个组合,……

奖学金 (C语言代码)

摘要:解题思路:设计学生成绩结构,成员有学号、语文分和总分。定义学生成绩数组,在输入数据过程中,首先按照数组的下标建索引,并记录相应的学号和分数;这里不仅要按总分从高到低排序,还要在总分相同时,按语文成绩从……

蓝桥杯算法提高VIP-密码锁 (C++代码)

摘要:解题思路:        BFS + Hash。Hash 用来记录某个状态是否走过。广搜每次都与相邻位置交换入列即可。参考代码:#include<bits/stdc++.h> using names……

姓名排序 (C++代码)

摘要:解题思路:简单理解通俗易懂注意事项:参考代码:#include <iostream> #include <algorithm> using namespace std; int m,n; in……

循环入门练习6 (C语言代码)

摘要:解题思路:注意事项:第二个循环跳出后,j要置1.参考代码:#include <stdio.h>int main(){    int N=0,j=1,i=1;    scanf("%d",&N);   ……

可AC (C语言代码)

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int num[40] = { 1, 1 }; int N, i, j, k; scanf("%d", &N);……