POJ 2039 To and Fro(模拟)】的更多相关文章

To and Fro Description Mo and Larry have devised a way of encrypting messages. They first decide secretly on the number of columns and write the message (letters only) down the columns, padding with extra random letters so as to make a rectangular ar…
To and Fro Description Mo and Larry have devised a way of encrypting messages. They first decide secretly on the number of columns and write the message (letters only) down the columns, padding with extra random letters so as to make a rectangular ar…
To and Fro Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 8632   Accepted: 5797 Description Mo and Larry have devised a way of encrypting messages. They first decide secretly on the number of columns and write the message (letters only)…
Maya Calendar Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 64795   Accepted: 19978 Description During his last sabbatical, professor M. A. Ya made a surprising discovery about the old Maya calendar. From an old knotted message, profes…
题目链接 题意 : 一个10×15的格子,有三种颜色的球,颜色相同且在同一片内的球叫做cluster(具体解释就是,两个球颜色相同且一个球可以通过上下左右到达另一个球,则这两个球属于同一个cluster,同时cluster含有至少两个球),每次选择cluster中包含同色球最多的进行消除,每次消除完之后,上边的要往下移填满空的地方,一列上的球移动之前与之后相对位置不变,如果有空列,右边的列往左移动,每一列相对位置不变 . 思路 : 模拟......不停的递归..... ////POJ 1027…
链接: http://poj.org/problem?id=3414 http://acm.hust.edu.cn/vjudge/contest/view.action?cid=22009#problem/J Pots Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 8253   Accepted: 3499   Special Judge Description You are given two pots, havin…
链接:poj 2632 题意:在n*m的房间有num个机器,它们的坐标和方向已知,现给定一些指令及机器k运行的次数, L代表机器方向向左旋转90°,R代表机器方向向右旋转90°,F表示前进,每次前进一米 若前进时机器i撞到机器j,输出"Robot i crashes into robot j " 若机器走出了n*m的房间,输出"Robot i crashes into the wall " 当出现上述情况.仅仅需输出第一次出现上述的情况 若全部指令运行完,全部机器都…
题目链接:http://poj.org/problem? id=1028 Description Standard web browsers contain features to move backward and forward among the pages recently visited. One way to implement these features is to use two stacks to keep track of the pages that can be rea…
题目链接:http://poj.org/problem?id=3087 题目大意:已知两堆牌s1和s2的初始状态, 其牌数均为c,按给定规则能将他们相互交叉组合成一堆牌s12,再将s12的最底下的c块牌归为s1,最顶的c块牌归为s2,依此循环下去. 现在输入s1和s2的初始状态 以及 预想的最终状态s12.问s1 s2经过多少次洗牌之后,最终能达到状态s12,若永远不可能相同,则输出"-1". 解题思路:照着模拟就好了,只是判断是否永远不能达到状态s12需要用map,定义map<…
链接: http://poj.org/problem?id=1068 http://acm.hust.edu.cn/vjudge/contest/view.action?cid=27454#problem/B Parencodings Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 17044   Accepted: 10199 Description Let S = s1 s2...s2n be a well-forme…