• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
tmeteorj
Nothing is so big that it is impossible to get over, and hurt only serves to make us stronger. 没有什么事是大到无法战胜的,痛苦也只会让我们变得更加坚强。
博客园 | 首页 | 新随笔 | 新文章 | 联系 | 订阅 订阅 | 管理

2012年9月3日

POJ 2110
摘要: O(n^3log(n))47MS水过,枚举高度差log(n),枚举最低高度n,dfs一遍n^2View Code 1 #include<cstdio> 2 #include<cstring> 3 #include<algorithm> 4 using namespace std; 5 bool mark[105][105]; 6 int map[105][105]; 7 int n; 8 bool dfs(int x,int y,int mmin,int len) 9 {10 mark[x][y]=true;11 if(x==n&&y==n) 阅读全文
posted @ 2012-09-03 20:15 tmeteorj 阅读(200) 评论(0) 推荐(0)
 
POJ 2960
摘要: 利用SG函数特性,和的SG函数等于单独SG函数的异或,然后对预处理SG函数View Code 1 #include<cstdio> 2 #include<cstring> 3 #include<algorithm> 4 using namespace std; 5 int sg[10005]; 6 bool mark[10005][105]; 7 int s[105]; 8 int main() 9 {10 int m;11 while(scanf("%d",&m)&&m)12 {13 memset(mark,fa 阅读全文
posted @ 2012-09-03 19:35 tmeteorj 阅读(245) 评论(0) 推荐(0)
 
 

公告


博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3