ZOJ 3819 Average Score(数学题 牡丹江)2014年ACM/ICPC 亚洲区域赛牡丹江(第一站)...
分类:
其他好文 时间:
2014-10-12 23:15:28
阅读次数:
273
Do you know reverse Polish notation (RPN)? It is a known notation in the area of mathematics and computer science. It is also known as postfix notation since every operator in an expression
follows ...
分类:
其他好文 时间:
2014-10-12 22:58:58
阅读次数:
263
DominationTime Limit:8 Seconds Memory Limit:131072 KB Special JudgeEdward is the headmaster of Marjar University. He is enthusiastic about chess and o...
分类:
其他好文 时间:
2014-10-12 22:15:38
阅读次数:
260
///dp[i][j][k]表示i行j列已经有棋子,且放了k个的概率
///dp[i][j][k]一共有四种转移方式
///1:dp[i-1][j][k-1] 概率为 (n-(i-1))*j/(n*m-(k-1))
///2:dp[i][j-1][k-1] 概率为 i*(m-(j-1))/(n*m-(k-1))
///3:dp[i-1][j-1][k-1] 概率为 (n-(i-1))*(...
分类:
其他好文 时间:
2014-10-12 22:08:18
阅读次数:
198
题意 一只狗要逃离迷宫 可以往上下左右4个方向走 每走一步耗时1s 每个格子只能走一次且迷宫的门只在t时刻打开一次 问狗是否有可能逃离这个迷宫
直接DFS 直道找到满足条件的路径 或者走完所有可能路径都不满足
注意剪枝 当前位置为(r,c) 终点为(ex,ey) 剩下的时间为lt 当前点到终点的直接距离为 d=(ex-r)+(ey-c) 若多走的时间rt=lt-d
...
分类:
其他好文 时间:
2014-10-12 22:07:58
阅读次数:
249
ZOJ 3827 Information Entropy(数学题)2014年ACM/ICPC 亚洲区域赛牡丹江(第一站)...
分类:
其他好文 时间:
2014-10-12 21:51:48
阅读次数:
263
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 chessboard with N rows
and M columns.
...
分类:
其他好文 时间:
2014-10-12 21:51:28
阅读次数:
382
题目链接:
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3822
Domination
Time Limit: 8 Seconds Memory Limit: 131072 KB Special Judge
Edward is the headmaster of Marja...
分类:
其他好文 时间:
2014-10-12 21:37:08
阅读次数:
227
概率dp,一开始用了二维超时,后来加了一位记忆化就不超时了啊。dp[x][y][z]代表已经覆盖了第x行y列此时还剩下k个空格。
所以:dp[x][y][z] = p1*dp[x+1][y][z-1]+p2*dp[x][y+1][z-1]+p3*dp[x+1][y+1][z-1]+p4*dp[x][y][z-1] + 1。
Domination
Time Limit: 8 Secon...
分类:
其他好文 时间:
2014-10-12 21:20:08
阅读次数:
244
题意:
模拟python的字典。给出一个字典,然后有1000个查询,输出对应的键值。
分析:
简单粗暴的字符串神烦模拟。因为打的网络同步赛,内存限制得很死,采用了离线操作。
抓住这几个关键的符号:‘{’ '}' ',' ':' 进行操作。具体见代码及注释,数据不是非常恶心。...
分类:
其他好文 时间:
2014-10-12 19:12:48
阅读次数:
224