• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
slon
nit-acm
博客园    首页    新随笔    联系   管理    订阅  订阅
2012年4月3日
hdu 4205 Parking Ships
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4205有很多船要停在自己的家前面,船长的船一定要停在家门口中间,输出最多多少个船在家门口。dp[i][j]=min(dp[i-1][j] , if(dp[i-1][j-1]<=w[i].x) max(dp[i-1][j-1]+w[i].li,w[i].x) ) 。。。碰到船长的船是固定的。View Code 1 #include <iostream> 2 #include <stdio.h> 3 #include <string.h> 4 #include <a 阅读全文
posted @ 2012-04-03 21:49 slon 阅读(526) 评论(0) 推荐(1)
hdu 4197 Popping Balloons
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=4197题目说要飞最少的飞镖把所有气球穿破。对于任意一个气球,要把它打破,扔的飞镖必然是在它的两条切线的上下界内。然后排序,枚举起点定义方向进行贪心。View Code 1 #include <iostream> 2 #include <stdio.h> 3 #include <string.h> 4 #include <math.h> 5 #include <algorithm> 6 #include <limits.h> 7 using 阅读全文
posted @ 2012-04-03 20:26 slon 阅读(348) 评论(0) 推荐(1)
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3