• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
startgo
博客园 首页 新随笔 联系 订阅 订阅 管理

2013年2月1日

Uva 11235
摘要: 1 #include<stdio.h> 2 #include<math.h> 3 const int N = 100010;//区间最大长度 4 const int M = 32; 5 int d[N][M];//表示从i开始长度为2^j的一段元素中的最小值 6 int A[N];//元素 7 int n; //元素从1到n编号 8 int max(int a, int b) { 9 return a > b ? a : b;10 }11 12 int RMQ_init() {13 for(int i = 1; i <= n; ++i) d[i][0] = 阅读全文
posted @ 2013-02-01 22:17 startgo 阅读(177) 评论(0) 推荐(0)
 
LA 3942
摘要: 1 #include<stdio.h> 2 #include<string.h> 3 const int maxnode = 500000; 4 const int sigma_size = 26; 5 const int N = 300010; 6 const int mod = 20071027; 7 int ch[maxnode][sigma_size]; 8 int val[maxnode]; 9 int sz;10 int idx(char c) { return c - 'a';}11 12 void Trie_init() { sz = 1 阅读全文
posted @ 2013-02-01 20:15 startgo 阅读(208) 评论(0) 推荐(0)
 
 

公告


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