![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
搜索
LmiChan
这个作者很懒,什么都没留下…
展开
-
POJ1426遇到超时或是超内存怎么办?
代码#include <iostream>#include <cstdio>#include <queue>using namespace std;class node {public: long long x; int length; node(long long x, int length) { this->x = x; this->length = length; }};void bfs(int n) { queu.原创 2020-11-18 13:25:01 · 185 阅读 · 0 评论 -
POJ3278
代码#include <iostream>#include <queue>using namespace std;int n, k;bool flag[100001];class node {public: int x; int step; node(int x, int step = 0) { this->x = x; this->step = step; }};void bfs(node start) { queue<n.原创 2020-11-17 19:26:14 · 125 阅读 · 0 评论 -
POJ2251
Sample Input3 4 5S.....###..##..###.#############.####...###########.#######E1 3 3S###E####0 0 0Sample OutputEscaped in 11 minute(s).Trapped!代码#include <iostream>#include <queue>using namespace std;int l, r, c;.原创 2020-11-17 18:56:41 · 85 阅读 · 0 评论 -
POJ 1321
代码#include <iostream>using namespace std;char canvas[8][8];bool flag[8]; // 记录某一列是否已有棋子int ans; // 方案数int n, k; int cnt; // 当前已经放的棋子数目void dfs(int row){ if (cnt == k){ ans++; return; } if (row >= n) return; for (int i = 0; i &.原创 2020-11-17 16:44:57 · 197 阅读 · 0 评论