摘要: ou are in a maze; seeing n doors in front of you in beginning. You can choose any door you like. The probability for choosing a door is equal for all 阅读全文
posted @ 2019-08-28 00:51 coolwx 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 注意了,求期望很多时候都是倒推的,而这所谓的倒推主要是指与目标距离之间的“步长大小”,与目标相距为n即为所求,也就是dp【0】 阅读全文
posted @ 2019-08-28 00:40 coolwx 阅读(118) 评论(0) 推荐(0) 编辑
摘要: imi learned a new thing about integers, which is - any positive integer greater than 1 can be divided by its divisors. So, he is now playing with this 阅读全文
posted @ 2019-08-28 00:31 coolwx 阅读(138) 评论(0) 推荐(0) 编辑
摘要: Given a dice with n sides, you have to find the expected number of times you have to throw that dice to see all its faces at least once. Assume that t 阅读全文
posted @ 2019-08-28 00:15 coolwx 阅读(96) 评论(0) 推荐(0) 编辑
摘要: 简单的概率dp,我们这里的关键是使用滚动数组,可以使得所谓的“无后效性”更加具体实现 阅读全文
posted @ 2019-08-26 23:46 coolwx 阅读(199) 评论(0) 推荐(0) 编辑
摘要: There are n cities numbered from 1 to n in Berland. Some of them are connected by two-way roads. Each road has its own length — an integer number from 阅读全文
posted @ 2019-07-21 17:29 coolwx 阅读(186) 评论(0) 推荐(0) 编辑
摘要: A catenym is a pair of words separated by a period such that the last letter of the first word is the same as the last letter of the second. For examp 阅读全文
posted @ 2019-07-13 16:50 coolwx 阅读(192) 评论(0) 推荐(0) 编辑
摘要: Bessie's been appointed the new watch-cow for the farm. Every night, it's her job to walk across the farm and make sure that no evildoers are doing an 阅读全文
posted @ 2019-07-13 13:47 coolwx 阅读(110) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <cstdio> #include <algorithm> #include <vector> using namespace std; struct edge{ int to,cost; }; struct edge2{ int id,fr 阅读全文
posted @ 2019-07-12 17:24 coolwx 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 杭州人称那些傻乎乎粘嗒嗒的人为62(音:laoer)。 杭州交通管理局经常会扩充一些的士车牌照,新近出来一个好消息,以后上牌照,不再含有不吉利的数字了,这样一来,就可以消除个别的士司机和乘客的心理障碍,更安全地服务大众。 不吉利的数字为所有含有4或62的号码。例如: 62315 73418 8891 阅读全文
posted @ 2019-07-11 23:48 coolwx 阅读(113) 评论(0) 推荐(0) 编辑