H. 硬币水题II
Time Limit: 1000ms
Case Time Limit: 1000ms
Memory Limit: 65536KB
64-bit integer IO format: %lld Java class name: Main
Submit Status PID:
29064
Font Size:
+
-
小胖有一个正反面不对称的硬币。如果抛一次这个硬币,它的正面朝上的概率为p,反面朝上的概率为1-p。现在,小胖想用这个硬币来产生等概率的决策(50%对50%)。当然,只抛一次是不行的。小胖的策略是这样的:每一次决策,需要抛硬币两次,如果都是正面朝上或者都是反面朝上,那么就重新再做一次决策;如果是一正一反,那么如果......
阅读全文
Jungle Roads
Time Limit: 1000MS
Memory Limit: 10000K
Total Submissions: 17586
Accepted: 7937
Description
The Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between villages some years ago. But the jungle overtakes roads relentlessly, so the large road network is too expensive to maintain. The
Council of Elders must choose to stop maintaining some roads. The map above on the left shows all the roads in ......
阅读全文