随笔分类 -  模拟

摘要:题目链接:https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&category=648&page=show_problem&problem=5151You have a rectangle of s... 阅读全文
posted @ 2015-05-14 13:31 Oyking 阅读(790) 评论(0) 推荐(0)
摘要:题目链接:https://code.google.com/codejam/contest/4224486/Problem A.Mushroom Monster这题题意就是,有N个时间点,每个时间点,Kaylin可以吃掉一定数量的mushroom,Bartholomew可以放入任意数量的mushroo... 阅读全文
posted @ 2015-04-22 11:55 Oyking 阅读(364) 评论(0) 推荐(0)
摘要:比赛笔试链接:http://hihocoder.com/contest/ntest2015april/problems题目就不贴了。1、推箱子。思路:纯模拟。代码(28MS): 1 #include 2 using namespace std; 3 4 const int MAXV = 1001... 阅读全文
posted @ 2015-04-08 22:35 Oyking 阅读(4793) 评论(4) 推荐(0)
摘要:Problem DescriptionPeer-to-peer(P2P) computing technology has been widely used on the Internet to exchange data. A lot of P2P file sharing systems exist and gain much popularity in nowadays.Let's consider a simplified model of P2P file sharing system: There are many computers in the system, and 阅读全文
posted @ 2013-10-26 14:17 Oyking 阅读(330) 评论(0) 推荐(0)
摘要:DescriptionP. T. Tigris is a student currently studying graph theory. One day, when he was studying hard, GS appeared around the corner shyly and came... 阅读全文
posted @ 2013-10-18 20:42 Oyking 阅读(320) 评论(0) 推荐(0)
摘要:Problem DescriptionJapanese Mahjong is a four-player game. The game needs four people to sit around a desk and play with a set of Mahjong tiles. A set of Mahjong tiles contains four copies of the tiles described next:One to nine Man, which we use 1m to 9m to represent;One to nine Sou, which we use 1 阅读全文
posted @ 2013-10-03 17:41 Oyking 阅读(311) 评论(0) 推荐(0)
摘要:DescriptionAndy is fond of old computers. He loves everything about them and he uses emulators of old operating systems on his modern computer. Andy also likes writing programs for them. Recently he has decided to write a text editor for his favorite text-mode operating system. The most difficult ta 阅读全文
posted @ 2013-08-31 19:02 Oyking 阅读(234) 评论(0) 推荐(0)
摘要:DescriptionYou have just run out of disk space and decided to delete some of your directories. Rationally, you will first have an exploration of what you have in your file system. And more rationally, you will do this exploration through a command line interface. The interface used in this problem i 阅读全文
posted @ 2013-08-29 00:02 Oyking 阅读(263) 评论(0) 推荐(0)
摘要:DescriptionStudents often have problems taking up seats. When two students want the same seat, a quarrel will probably begin.It will have very bad effect when such subjects occur on the BBS. So, we urgently need a seat-taking-up rule. After several days of argument, the rule finally comes out: As sh 阅读全文
posted @ 2013-08-16 17:14 Oyking 阅读(339) 评论(0) 推荐(0)
摘要:DescriptionToo worrying about the house price bubble, poor Mike sold his house and rent an apartment in a 50-floor building several months ago. This building has only one elevator because it is a so called “rotten tail building”. There are always a lot of people crowding at the gate of the elevator 阅读全文
posted @ 2013-08-16 14:56 Oyking 阅读(399) 评论(0) 推荐(0)
摘要:一、代码: 1、求逆元(原理貌似就是拓展欧几里得,要求MOD是素数): 2、底层优化(正确性未验证): 3、扩栈,这玩意儿在OJ上用能防爆? 4、神速读入fread 二、神牛blog matrix67 ZKW watashi 三、专题 动态规划系列: 数位dp模板 字符串系列: 【专辑】AC自动机 阅读全文
posted @ 2013-08-14 23:48 Oyking 阅读(1294) 评论(0) 推荐(0)
摘要:There arenpsychos standing in a line. Each psycho is assigned a unique integer from1ton. At each step every psycho who has an id greater than the psycho to his right (if exists) kills his right neighbor in the line. Note that a psycho might kill and get killed at the same step.You're given the i 阅读全文
posted @ 2013-08-14 15:48 Oyking 阅读(881) 评论(0) 推荐(0)