• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
井_中窥月
万物美好,我在中央
博客园    首页    新随笔    联系   管理    订阅  订阅
05 2015 档案
算法提高 概率计算

摘要:算法提高 概率计算 时间限制:1.0s 内存限制:256.0MB问题描述 生成n个∈[a,b]的随机整数,输出它们的和为x的概率。输入格式 一行输入四个整数依次为n,a,b,x,用空格分隔。输出格式 输出一行包含一个小数位和为x的概率,小数点后保留四位小数样例输入2 1 3 4样例输出0.... 阅读全文
posted @ 2015-05-28 15:43 井_中窥月 阅读(1091) 评论(0) 推荐(0)
算法训练 安慰奶牛

摘要:[原]【Usaco Nov08 Gold】 安慰奶牛2014-5-26阅读159评论0DescriptionFarmer John变得非常懒, 他不想再继续维护供奶牛之间供通行的道路. 道路被用来连接N (5 #include #include #include #include #include ... 阅读全文
posted @ 2015-05-27 18:27 井_中窥月 阅读(236) 评论(0) 推荐(0)
算法训练 操作格子

摘要:问题描述有n个格子,从左到右放成一排,编号为1-n。共有m次操作,有3种操作类型:1.修改一个格子的权值,2.求连续一段格子权值和,3.求连续一段格子的最大值。对于每个2、3操作输出你所求出的结果。输入格式第一行2个整数n,m。接下来一行n个整数表示n个格子的初始权值。接下来m行,每行3个整数p,x... 阅读全文
posted @ 2015-05-27 15:28 井_中窥月 阅读(228) 评论(0) 推荐(0)
平方和,立方和公式

摘要:平方和 n(n+1)(2n+1)/6推导:(n+1)^3-n^3=3n^2+3n+1, n^3-(n-1)^3=3(n-1)^2+3(n-1)+1 .............................. 3^3-2^3=3*(2^2)+3*2+1 2^3-1^3=3*(1^2)... 阅读全文
posted @ 2015-05-21 16:49 井_中窥月 阅读(3011) 评论(0) 推荐(1)
uva 242

摘要:242 - Stamps and Envelope SizeTime limit: 3.000 secondsStamps and Envelope SizePhilatelists have collected stamps since long before postal workers wer... 阅读全文
posted @ 2015-05-16 09:31 井_中窥月 阅读(234) 评论(0) 推荐(0)
uva 1629

摘要:1629 - Cake slicingTime limit: 3.000 secondsA rectangular cake with a grid ofm*nunit squares on its top needs to be sliced into pieces. Several cherri... 阅读全文
posted @ 2015-05-16 09:21 井_中窥月 阅读(156) 评论(0) 推荐(0)
uva 1631

摘要:1631 LockerA password locker with N digits, each digit can be rotated to 0-9 circularly.You can rotate 1-3 consecutive digits up or down in one step.F... 阅读全文
posted @ 2015-05-16 09:11 井_中窥月 阅读(326) 评论(0) 推荐(0)
uva 1639--精度处理方法之取对数(uva 1639)

摘要:1639 - CandyTime limit: 3.000 seconds1639 CandyLazyChild is a lazy child who likes candy very much. Despite being very young, he has two large candy b... 阅读全文
posted @ 2015-05-14 21:51 井_中窥月 阅读(429) 评论(0) 推荐(0)
uva 11624(bfs)

摘要:11624 - Fire!Time limit: 1.000 secondsJoe works in a maze. Unfortunately, portions of the maze havecaught on re, and the owner of the maze neglected ... 阅读全文
posted @ 2015-05-13 22:35 井_中窥月 阅读(370) 评论(0) 推荐(0)
记忆化搜索

摘要:记忆化搜索/递归式动态规划:1.记忆化搜索的思想记忆化搜索的思想是,在搜索过程中,会有很多重复计算,如果我们能记录一些状态的答案,就可以减少重复搜索量2、记忆化搜索的适用范围根据记忆化搜索的思想,它是解决重复计算,而不是重复生成,也就是说,这些搜索必须是在搜索扩展路径的过程中分步计算的题目,也就是“... 阅读全文
posted @ 2015-05-12 22:51 井_中窥月 阅读(115) 评论(0) 推荐(0)
uva 10118

摘要:10118 - Free CandiesTime limit: 30.000 secondsLittle Bob is playing a game. He wants to win some candies in it - as many as possible.There are 4 piles... 阅读全文
posted @ 2015-05-12 22:42 井_中窥月 阅读(291) 评论(0) 推荐(0)
A-Making the Grade(POJ 3666)

摘要:Making the GradeTime Limit:1000MSMemory Limit:65536KTotal Submissions:4656Accepted:2206DescriptionA straight dirt road connects two fields on FJ's far... 阅读全文
posted @ 2015-05-08 13:57 井_中窥月 阅读(276) 评论(0) 推荐(0)
E-Eating Together(POJ 3670)

摘要:Eating TogetherTime Limit:1000MSMemory Limit:65536KTotal Submissions:5579Accepted:2713DescriptionThe cows are so very silly about their dinner partner... 阅读全文
posted @ 2015-05-05 22:03 井_中窥月 阅读(179) 评论(0) 推荐(0)
F-Dining Cows(POJ 3671)

摘要:Dining CowsTime Limit:1000MSMemory Limit:65536KTotal Submissions:7584Accepted:3201DescriptionThe cows are so very silly about their dinner partners. T... 阅读全文
posted @ 2015-05-05 21:58 井_中窥月 阅读(288) 评论(0) 推荐(0)
I-MooFest(POJ 1990)

摘要:MooFestTime Limit:1000MSMemory Limit:30000KTotal Submissions:5697Accepted:2481DescriptionEvery year, Farmer John's N (1 #include #include #include #in... 阅读全文
posted @ 2015-05-05 18:57 井_中窥月 阅读(160) 评论(0) 推荐(0)
A-Apple Catching(POJ 2385)

摘要:Apple CatchingTime Limit:1000MSMemory Limit:65536KTotal Submissions:8759Accepted:4264DescriptionIt is a little known fact that cows love apples. Farme... 阅读全文
posted @ 2015-05-04 18:37 井_中窥月 阅读(191) 评论(0) 推荐(0)
H-The Cow Lineup(POJ 1989)

摘要:The Cow LineupTime Limit:1000MSMemory Limit:30000KTotal Submissions:5367Accepted:3196DescriptionFarmer John's N cows (1 #include #include #include #in... 阅读全文
posted @ 2015-05-04 18:31 井_中窥月 阅读(235) 评论(0) 推荐(0)

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