上一页 1 ··· 3 4 5 6 7 8 下一页
摘要: "迷宫" + $ bfs $ 无法解决路径重叠问题?抑或是只是我不会? + $ dfs $ 解决上述问题 + 递推答案 ? 好吧一开始想错了,这里的起点终点并不固定,$移动规则无序$,递推没有方向啊.而不像 "过河卒" 一样. + 如果不是数据范围太小,此题还是可以的(当然并不是很难) cpp in 阅读全文
posted @ 2018-07-14 08:18 昤昽 阅读(86) 评论(0) 推荐(0) 编辑
摘要: "单词方阵" + 搜索. 按方向 $dfs$ 即可 + 每次搜索前要清除标记 cpp include include include const int MAXN=100+1; const int dx[8]={ 1,1,0,0, 1,1, 1,1}; const int dy[8]={0,0, 1 阅读全文
posted @ 2018-07-14 07:11 昤昽 阅读(152) 评论(0) 推荐(0) 编辑
摘要: [TOC] 目录 输入$[$ $TOC ]$,即可自动生成目录。 格式为标题1~6的会被自动选为目录。 数学符号 注:代码两侧加 "$" 符号|代码 | $\forall$|\\ $forall$ $\exists$|\\ $exists$ $\leq$ | \\ $leq$ $\geq$ | \\ 阅读全文
posted @ 2018-07-13 21:53 昤昽 阅读(199) 评论(0) 推荐(0) 编辑
摘要: "纪念品分组" 难题不会做,只能来做这种简单题 当年看起来无比难的题现在竟然如此简单了 希望有一天能够看现在的难题也很简单吧. + 贪心 + front 指向最前,rear 指向最后,如果 p[front]+p[rear] $\leq$ w,则归到一组,否则 p[front] 单独一组 cpp in 阅读全文
posted @ 2018-07-13 20:43 昤昽 阅读(102) 评论(0) 推荐(0) 编辑
摘要: "线段覆盖" 那么长时间了,终于~~敢于~~做完这道题了 我说是我懒你信不? + 贪心 + 右端点越往左,对后面的"限制"越小 ~~蒟蒻为数不多的几道一遍A的 水题 ~~ 阅读全文
posted @ 2018-07-13 20:20 昤昽 阅读(127) 评论(0) 推荐(0) 编辑
摘要: "NOIp2017 Cheese" 那么长时间了,,,,后天就要去华师参加夏令营了...然而今天才做出来这道题... ~~就是一个搜索.~~ cpp include include include include using namespace std; const int MAXN=1e3+1; 阅读全文
posted @ 2018-07-13 19:39 昤昽 阅读(69) 评论(0) 推荐(0) 编辑
摘要: "UVa12657" cpp include include const int MAXN=1e5+5; int next[MAXN],pre[MAXN],inv=0; inline int read() { int f=1,x=0;char c=getchar(); while(c'9'){if( 阅读全文
posted @ 2018-07-13 14:55 昤昽 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 经典搜索题,bfs 1 #include <queue> 2 #include <cstdio> 3 #include <cstring> 4 #include <iostream> 5 using namespace std; 6 const int fact[9]={1,1,2,6,24,120 阅读全文
posted @ 2018-07-12 06:18 昤昽 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 1.快速排序 1 #include <cstdio> 2 const int MAXN=1e5+1; 3 int a[MAXN]; 4 inline int read() 5 { 6 int f=1,x=0;char c=getchar(); 7 while(c<'0'||c>'9'){if(c== 阅读全文
posted @ 2018-07-10 19:22 昤昽 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 2017青岛比赛第二题(亦或是最后一题?记不真切了),后天就青岛2018了。。。然而今天才会去年的题。。。 题目大意 有n个城市,编号1~n。其中 i 号城市的繁华度为 Pi,省内有 m 条可以双向通行的高速公路,编号1~m。编号为 j 的高速公路连接编号为 Aj 和 Bj 的两个城市, 经过这条公 阅读全文
posted @ 2018-05-20 17:09 昤昽 阅读(276) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 下一页