摘要: Protecting the FlowersTime Limit:2000MSMemory Limit:65536KTotal Submissions:3204Accepted:1300DescriptionFarmer John went to cut some wood and leftN(2 ≤N≤ 100,000) cows eating the grass, as usual. When he returned, he found to his horror that the cluster of cows was in his garden eating his beautiful 阅读全文
posted @ 2013-07-23 16:25 KRisen 阅读(777) 评论(0) 推荐(0) 编辑
摘要: 感觉有必要写一篇日志反省下一开始踌躇满志的ACM之路,如今走得越发有些艰难我在努力找节奏只是我是自己太笨了还是怎么回事,这两天的代码。。我不想吐槽了先是我敲得特别顺心的一个模拟题,用队列做的,就RE,我怎么也想不通哪里会爆栈,人家用JAVA写的几乎和我一样的队列模拟,就过了还有今天的BFS那个题,是我想简单了?大家都用的三维数组+哈希来做,我用我的二维数组广搜一下出问题了,但是我模拟了一下搜索过程,就是不知道怎么会有问题就连数据测试了那么久都没找出来,我一度认为是结构体里定义的数组有问题,难道结构体里面定义的数组会作为公共的?我还专门测试了一番,发现不是啊,人家是相互独立的,那我就只能让这题先 阅读全文
posted @ 2013-07-22 23:12 KRisen 阅读(133) 评论(0) 推荐(0) 编辑
摘要: A -胜利大逃亡(续)Time Limit:2000MSMemory Limit:32768KB64bit IO Format:%I64d & %I64uSubmitStatusDescriptionIgnatius再次被魔王抓走了(搞不懂他咋这么讨魔王喜欢)……这次魔王汲取了上次的教训,把Ignatius关在一个n*m的地牢里,并在地牢的某些地方安装了带锁的门,钥匙藏在地牢另外的某些地方。刚开始Ignatius被关在(sx,sy)的位置,离开地牢的门在(ex,ey)的位置。Ignatius每分钟只能从一个坐标走到相邻四个坐标中的其中一个。魔王每t分钟回地牢视察一次,若发现Ignati 阅读全文
posted @ 2013-07-22 15:11 KRisen 阅读(283) 评论(0) 推荐(0) 编辑
摘要: A -Card StackingTime Limit:1000MSMemory Limit:65536KB64bit IO Format:%I64d & %I64uSubmitStatusDescriptionBessie is playing a card game with herN-1 (2 ≤N≤ 100) cow friends using a deck withK(N≤K≤ 100,000;Kis a multiple ofN) cards. The deck containsM=K/N"good" cards andK-M"bad" 阅读全文
posted @ 2013-07-20 08:48 KRisen 阅读(313) 评论(0) 推荐(0) 编辑
摘要: POJ - 3258River HopscotchTime Limit:2000MSMemory Limit:65536KB64bit IO Format:%I64d & %I64u[Submit] [Go Back] [Status]DescriptionEvery year the cows hold an event featuring a peculiar version of hopscotch that involves carefully jumping from rock to rock in a river. The excitement takes place on 阅读全文
posted @ 2013-07-18 23:59 KRisen 阅读(1617) 评论(0) 推荐(0) 编辑
摘要: POJ-3273 Monthly ExpenseTime Limit:2000MSMemory Limit:65536KTotal Submissions:10557Accepted:4311DescriptionFarmer John is an astounding accounting wizard and has realized he might run out of money to run the farm. He has al... 阅读全文
posted @ 2013-07-17 19:19 KRisen 阅读(2273) 评论(0) 推荐(0) 编辑
摘要: A -PermutationsTime Limit:2000MSMemory Limit:262144KB64bit IO Format:%I64d & %I64uSubmitStatusDescriptionHappy PMP is freshman and he is learning about algorithmic problems. He enjoys playing algorithmic games a lot.One of the seniors gave Happy PMP a nice game. He is given two permutations of n 阅读全文
posted @ 2013-07-17 13:47 KRisen 阅读(530) 评论(0) 推荐(0) 编辑
摘要: 1086: 超市购物Time Limit: 1 SecMemory Limit: 128 MBSubmit: 183Solved: 73[Submit][Status][Web Board]Description 上次去超市扫荡回来的东西用完了,Staginner又得跑超市一趟,出发前他列了一张购物清单,打算去买K种不同的商品,每种买一件。到了超市,Staginner发现每种商品有N个品牌,每个品牌此商品的价格为Vi,对Staginner的作用值为Wi,他会从这N个品牌里面挑一个品牌买。这时,Staginner突然想起出门时只带了M元钱,又懒得去取钱了,所以不一定能买完K种商品,只好尽可... 阅读全文
posted @ 2013-04-27 17:54 KRisen 阅读(244) 评论(2) 推荐(0) 编辑
摘要: Charm BraceletTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 15677Accepted: 7130DescriptionBessie has gone to the mall's jewelry store and spies a charm bracelet. Of course, she'd like to fill it with the best charms possible from the N (1 ≤ N ≤ 3... 阅读全文
posted @ 2013-04-24 10:46 KRisen 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 斌牛出的校赛题1271: Brackets SequenceTime Limit: 1 SecMemory Limit: 128 MBSubmit: 92Solved: 36[Submit][Status][Web Board]Description Let us define a regular brackets sequence in the following way: 1. Empty sequence is a regular sequence. 2. If S is a regular sequence, then (S) is a regular sequenc... 阅读全文
posted @ 2013-04-20 15:34 KRisen 阅读(305) 评论(0) 推荐(0) 编辑