LOOPS Time Limit: 15000/5000 MS (Java/Others) Memory Limit: 125536/65536 K (Java/Others) Total Submission(s): 1864 Accepted Submission(s): 732 Problem Description Akemi Homura is a Mahou Shoujo (Puella Magi/Magical Girl). Homura wants to help h
Collecting Bugs Ivan is fond of collecting. Unlike other people who collect post stamps, coins or other material stuff, he collects software bugs. When Ivan gets a new program, he classifies all possible bugs into n categories. Each day he discovers
D - LOOPS Time Limit:5000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Status Description Akemi Homura is a Mahou Shoujo (Puella Magi/Magical Girl). Homura wants to help her friend Madoka save the world. But because of the plot
题目大意:在一个树形迷宫中,以房间为节点.有n间房间,每间房间存在陷阱的概率为ki,存在出口的概率为ei,如果这两种情况都不存在(概率为pi),那么只能做出选择走向下一个房间(包括可能会走向上一个房间).根节点为1,当遇到陷阱时必须返回到根节点1处重新开始,当遇到出口时,走出迷宫.问从开始到走出迷宫所做出选择次数的期望值. 题目分析:定义状态dp(i)表示在节点 i 处直到走出迷宫的选择次数期望值.则状态转移方程为: dp(i)=ki*dp(1)+(1/m)*pi*∑(dp(son)+1) (i
E - The Arrow Time Limit:1000MS Memory Limit:64000KB 64bit IO Format:%lld & %llu Submit Status Description The history shows that We need heroes in every dynasty. For example, Liangshan Heroes. People hope that these heroes can punish the bad
C - Collecting Bugs Time Limit:10000MS Memory Limit:64000KB 64bit IO Format:%I64d & %I64u Submit Status Description Ivan is fond of collecting. Unlike other people who collect post stamps, coins or other material stuff, he collects software b
Hzz loves aeroplane chess very much. The chess map contains N+1 grids labeled from 0 to N. Hzz starts at grid 0. For each step he throws a dice(a dice have six faces with equal probability to face up and the numbers on the faces are 1,2,3,4,5,6). Whe
Domination Time Limit: 8 Seconds Memory Limit: 131072 KB Special Judge Edward is the headmaster of Marjar University. He is enthusiastic about chess and often plays chess with his friends. What's more, he bought a large decorative chessboar
Recently poet Mr. po encountered a serious problem, rumor said some of his early poems are written by others. This brought a lot of trouble to Mr. po, so one day he went to his best friend MasterO for help. MasterO handed over a small wooden box with