- 博客(2)
- 收藏
- 关注
原创 codevs1215 迷宫
用dfs做的,还不嫌累的用if,当然bfs也很好做(代码很丑)。#include <cstdio> #include <cstring> #include <algorithm> #include <iostream> using namespace std; int n; bool flag; bool vis[50][50]; char s[50][50]; void dfs(int x,int
2017-02-08 21:24:12 406
原创 codevs1294 全排列
dfs入门题目#include <cstdio> #include <cstring> #include <algorithm> using namespace std; int n; int a[5000]; bool vis[5555]; void dfs(int x) { if(x > n) { for(int i = 1; i <= n; i ++)
2017-02-08 21:20:06 110
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人