
数学:概率
文章平均质量分 82
Killerfear
这个作者很懒,什么都没留下…
展开
-
UVA 11605 - Lights inside a 3d Grid 概率
思路:我们只需要算出每个cell在K次turn之后,状态是ON的概率就行了。在一次turn中一个cell被翻转的概率是多少呢?假设这个cell的坐标是(x,y,z),那么被翻转的概率就是 (x + 1) * (N - x) * (y + 1) * (M - y) * (z + 1) * (P - 1)/ (N * N * M * M * P * P) , 然后K次中只要是有奇数次翻转,最后就是ON原创 2015-01-27 13:30:49 · 495 阅读 · 0 评论 -
UVA 10417 - Gift Exchanging
#include #include #include #include #include #include #include #include #include #include #include using namespace std;#define rep(i,a,b) for(int i=(a);i<(int)(b);++i)#define rrep(i原创 2015-01-27 15:24:31 · 551 阅读 · 0 评论 -
UVA 11176 - Winning Streak
Problem BWinning StreakInput: Standard InputOutput: Standard Output "You can run on for a long time,sooner or later God'll cut you down."– Traditional folk songMikael likes to gamble,原创 2015-01-27 20:58:34 · 519 阅读 · 0 评论 -
UVA 11971 Polygon
U — PolygonTime Limit: 1 secMemory Limit: 32 MBJohn has been given a segment of lenght N, however he needs a polygon. In order to create a polygon he has cut given segment K times at rand原创 2015-01-27 17:53:08 · 469 阅读 · 0 评论