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

2013年3月7日

hdu 4396
摘要: 1 #include<stdio.h> 2 #include<string.h> 3 const int INF = 1 << 30; 4 const int N = 5000; 5 const int M = 300000; 6 int n, m; 7 struct Edge { 8 int u, v, w, next; 9 Edge() {}10 Edge(int u, int v, int w, int next) : u(u), v(v), w(w), next(next) {}11 }E[M];12 int head[N], tot;13 void 阅读全文
posted @ 2013-03-07 16:31 startgo 阅读(207) 评论(0) 推荐(0)
 
hdu 4391
摘要: 1 /*hdu 4391 Paint The Wall 区间修改加最大最小值优化 2 *@题意 :: 刷墙,以开始有n个节点,每个节点有一种颜色,m次询问输入a,l,r,z。 3 * 如果 a=1 将l到r刷为z颜色。 4 * 如果 a=2 询问l到r有多少个和z相同的节点 5 */ 6 #include<stdio.h> 7 const int N = 100010; 8 struct Line { 9 int col;10 int min, max;11 }T[N * 4];12 void Push_up(int o) {13 in... 阅读全文
posted @ 2013-03-07 13:13 startgo 阅读(247) 评论(0) 推荐(0)
 
HDU 4390
摘要: 1 #include<stdio.h> 2 #include<string.h> 3 typedef long long LL; 4 const int N = 1000001; 5 const int MOD = 1000000007; 6 bool isprime[N];//判断某一个数是不是素数 7 int nprime;//质数个数 8 int prime[N];//质数 9 int C[110][110];10 void init() {11 nprime = 0;12 memset(isprime, true, sizeof(isprime));13 is. 阅读全文
posted @ 2013-03-07 09:14 startgo 阅读(218) 评论(0) 推荐(0)
 
 

公告


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