- 博客(6)
- 问答 (1)
- 收藏
- 关注
原创 NOIP
NOIP复习纲要并查集模板:int Find(int x) { return (fa[x]==x)?x:(fa[x]=find(fa[x])); } void Union(int a,int b) { p1=Find(a); p2=Find(b); if(p1!=p2) fa[p1]=p2; }类别偏移:小胖的奇偶(poj1733)、食物链(poj1182)、黑帮团伙(poj1703)
2017-11-10 19:51:00 337
原创 poj1475 推箱子
题意:将箱子推到目标位置,要求推箱子的次数最少思路:1.纯bfs 2.优先队列 3.A*优先队列注意记录路径用字符数组(实测1094MS)不用字符串(实测超时)#include <iostream> #include <cstring> #include <cstdio> #include <cstdlib> #include <string> #include <cmath> #inc
2017-10-03 11:04:34 279
转载 noi国家集训队论文分类
组合数学 计数与统计 2001 - 符文杰:《Pólya原理及其应用》 2003 - 许智磊:《浅谈补集转化思想在统计问题中的应用》 2007 - 周冬:《生成树的计数及其应用》 2008 - 陈瑜希《Pólya计数法的应用》 数位问题 2009 - 高逸涵《数位计数问题解法研究》 2009 - 刘聪《浅谈数位类统计问题》 动态统计 2004 - 薛矛:《解决动态统计问题的
2017-08-26 19:22:52 311
原创 hash用法
现学两种 (1) bkdrhash int fac[10]={1,1,2,6,24,120,720,5040,40320,362880}; int calc(char s[9]) { int i,j,c=0,res=0; for (i=8; i>=0; i--) { c=0; for (j=0;j<i; j++) if (s[j]<s[
2016-08-20 10:02:19 318
原创 字符串处理
字符串(string): s.size()或s.length() 读字符个数 s1==s2 若s1==s2返回true否则返回false s1+s1 s1与s2连接 s.insert(pos,s2) 在下标pos位置插入s2字符串 s.substr(pos,len) 返回从pos开始的len个字符 s.erase(pos,len) 删除从pos开始的len个字符 s.replace(
2016-08-18 17:02:10 201
空空如也
poj1465 WA 较怪 求解
2016-08-11
TA创建的收藏夹 TA关注的收藏夹
TA关注的人