![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
模拟
Kefault
这个作者很懒,什么都没留下…
展开
-
codeforces 216C-Hiring Staff
DescriptionA new Berland businessman Vitaly is going to open a household appliances' store. All he's got to do now is to hire the staff.The store will work seven days a week, but not around the原创 2014-03-13 18:28:38 · 1321 阅读 · 0 评论 -
UVALive 5029 Encoded Barcodes
Encoded BarcodesTime Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %lluSubmit Status Practice UVALive 5029DescriptionAll the big malls need a powerful system f原创 2014-08-08 20:17:16 · 885 阅读 · 0 评论 -
hdu 4923 Room and Moor
Room and MoorTime Limit: 12000/6000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 539 Accepted Submission(s): 147Problem DescriptionPM Room def原创 2014-08-08 09:17:27 · 952 阅读 · 0 评论 -
hdu 4961 Boring Sum
Boring SumTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 737 Accepted Submission(s): 363Problem DescriptionNumber theory i原创 2014-08-21 20:17:20 · 615 阅读 · 0 评论 -
hdu 4950 Monster
MonsterTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 590 Accepted Submission(s): 238Problem DescriptionTeacher Mai has a ki原创 2014-08-15 18:33:22 · 1625 阅读 · 0 评论 -
bnu 34988 Happy Reversal
Happy ReversalElfness is studying in an operation "NOT".For a binary number A, if we do operation "NOT A", after that, all digits of A will be reversed. (e.g. A=1001101, after operation "NOT A原创 2014-08-16 20:06:34 · 953 阅读 · 0 评论 -
bnu 34982 Beautiful Garden
Beautiful GardenThere are n trees planted in lxhgww's garden. You can assume that these trees are planted along the X-axis, and the coordinate of ith tree is xi.But in rece原创 2014-08-16 20:18:28 · 968 阅读 · 0 评论 -
hdu 4970 Killing Monsters
Killing MonstersTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 160 Accepted Submission(s): 86Problem DescriptionKingdom Ru原创 2014-08-19 18:55:53 · 1004 阅读 · 0 评论 -
hdu 5058 So easy
So easyTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 160 Accepted Submission(s): 104Problem DescriptionSmall W gets two fil原创 2014-10-06 11:17:44 · 830 阅读 · 0 评论 -
hdu 5059 Help him
Help himTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 480 Accepted Submission(s): 119Problem DescriptionAs you know, when y原创 2014-10-06 11:22:54 · 1107 阅读 · 0 评论 -
acdream 1431 Sum vs Product
Sum vs ProductTime Limit: 4000/2000MS (Java/Others)Memory Limit: 128000/64000KB (Java/Others)SubmitStatisticNext ProblemProblem Description Peter has just learned mathematics. H原创 2014-10-06 18:26:27 · 1145 阅读 · 0 评论 -
hdu 4810 Wall Painting
Wall PaintingTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1265 Accepted Submission(s): 360Problem DescriptionMs.Fang love原创 2014-10-09 18:14:22 · 1135 阅读 · 0 评论 -
hdu 5017 Ellipsoid(模拟退火)
EllipsoidTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 1140 Accepted Submission(s): 412Special JudgeProblem DescriptionGive原创 2014-10-01 15:52:30 · 1323 阅读 · 0 评论 -
acdream 1414 Geometry Problem
Geometry ProblemTime Limit: 2000/1000MS (Java/Others) Memory Limit: 128000/64000KB (Java/Others) Special JudgeSubmitStatusProblem Description Peter is studying in the third原创 2014-10-04 18:41:57 · 1037 阅读 · 0 评论 -
hdu 4927 Series 1
Series 1Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 596 Accepted Submission(s): 214Problem DescriptionLet A be an integ原创 2014-08-08 09:27:00 · 1364 阅读 · 0 评论 -
hdu 4930 Fighting the Landlords
Fighting the LandlordsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 480 Accepted Submission(s): 163Problem DescriptionFig原创 2014-08-08 09:39:24 · 1061 阅读 · 0 评论 -
hdu 4891 The Great Pan
The Great PanTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 529 Accepted Submission(s): 200Problem DescriptionAs a programmi原创 2014-07-30 11:08:37 · 953 阅读 · 0 评论 -
codeforces 250B Restoring IPv6
题目:大意是在说给定一个ipv6地址的简记形式,让你给它补全输出。 简记的规则大致是把地址中的一部分0去掉,其中还包括一连串的0,此时可用::来代替。方法:首先记录给定的字符串中的:的个数,让后就能确定::中间要补全的0000的个数,然后对于每个小地址(例如bfd),补全失去的0就好了,这时候可以使用printf输出补0的功能,即:printf("%04s",s);注意原创 2014-04-29 18:17:28 · 1286 阅读 · 0 评论 -
codeforces 250C Movie Critics
题目:大意是说Valentine在想要去看电影,总共n场电影,每场电影都有一个对应的genre值x (1 ),但是Valentine不想把所有的电影都看完,他想把其中某些genre值=x的电影去掉,只看剩下的电影,但是还有一个问题:就是每场电影的时间是固定的,所以他必须按顺序来观看,当上一场电影的genre值与下一场的genre值不一样的时候,Valentin原创 2014-04-29 18:35:03 · 1087 阅读 · 0 评论 -
codeforces 219C Color Stripe
模拟,m=2的情况单独处理,因为m=2时,最后的结果只能是ABABABABA,或者BABABABBA,所以只要两者比较一下就行了。#include #include #include using namespace std;int main() { int n,m; char s[500100]; while(scanf("%d%d%s",&n,&m,s)!=-1原创 2014-03-19 15:33:26 · 1420 阅读 · 0 评论 -
nefu 643 teacher Li
题目:大意是说李老师的课堂上有n个学生,给出这n个人名单,今天共来了n-1个人,有一个人没来,给出这n-1个人的名单,来找出没来的那个人。方法:开始使用map,set都会超时,汗了半天,实在没办法了,看了一下别人的思路,神思路!!大致方法就是把他们n个人的名字加起来,然后在减去n-1个人的名字,剩下的就是没来的那个人的名字。这里需要使用到ASCII码和数字之间通用的属性。代码:#inc原创 2014-05-01 19:49:02 · 909 阅读 · 0 评论 -
nefu 627 剪纸游戏
题目:给定一个n*m大的纸张,上面表明了每块上的字母,在其背后给定了对应位置的字母的value,在最后给出需要剪出来的剪纸的字母序列。方法:暴力搜索。代码:#include #include #include #include using namespace std;char map[502][502];int Map[502][502];int vis[502][502原创 2014-05-02 14:36:14 · 1138 阅读 · 0 评论 -
codeforces 221B Little Elephant and Numbers
题目的意思是说给定一个数x,找到满足情况(d是x的约数,且d和x有至少一个相同的数字)d的个数,直接模拟就可以了。#include #include #include using namespace std;int main(){ int n,m,i,j; int ans=0; int a[10]; memset(a,0,原创 2014-03-20 19:47:03 · 1053 阅读 · 0 评论 -
CodeForces 245E Mishap in Club
#include #include #include #include using namespace std;int main(){ char s[350]; int p[350]; while(cin>>&s[1]) { p[0]=0; int l=0,r=0,ans=0;原创 2014-04-17 20:16:49 · 2812 阅读 · 0 评论 -
hdu 4588 Count The Carries
题目:大意就是说给定一个区间[l,r],求出l到r的二进制相加的进位次数。题解:首先的思路就是暴力,把每个数的二进制形式表示出来,再加起来,不过题目中说,测试数据大约为10000个,测试范围为1-1000000000,这样肯定会超时。然后就考虑,是否能够通过计算把每一二进制位的1的个数求出来,这样就能减少很多时间。首先,看一下1-9的二进制表示法来找一些规律:这样我们发现,对于第一位二进制原创 2014-04-17 21:01:50 · 1317 阅读 · 0 评论 -
CodeForces 230C Shifts
题目:大意是说给定n行序列,每行序列只由0和1组成,每行序列可以向左循环移动,也可以向右循环移动,问最小的移动次数使得有某一列全部元素为1.题解:有人是用dp的方法做的,我不会,这里只介绍模拟的方法:就是将每一行的所有的1的位置记录下来,然后将每两个1之间的所有元素看看它们靠两侧哪个1近,然后记录最小移动次数即可,最后将每一列相加,求最小的即可。#include #include原创 2014-04-03 20:03:46 · 985 阅读 · 0 评论 -
hdu 4770 Lights Against Dudely
Problem DescriptionHarry: "But Hagrid. How am I going to pay for all of this? I haven't any money." Hagrid: "Well there's your money, Harry! Gringotts, the wizard bank! Ain't no safer place. Not原创 2014-06-04 16:07:37 · 1008 阅读 · 0 评论 -
ZOJ 3403 Strange Calendar III
Strange Calendar IIITime Limit: 2 Seconds Memory Limit: 65536 KB As we know, in the Bzu planet and in the cc98 planet, people use special calendar which is similar to that used in t原创 2014-05-27 22:25:36 · 1046 阅读 · 0 评论 -
hdu 4908 BestCoder Sequence
BestCoder SequenceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 711 Accepted Submission(s): 253Problem DescriptionMr Potato原创 2014-08-05 09:43:54 · 882 阅读 · 0 评论 -
hdu 4915 Parenthese sequence
Parenthese sequenceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 50 Accepted Submission(s): 11Problem Descriptionbobo fou原创 2014-08-05 18:42:48 · 1106 阅读 · 0 评论 -
hdu 2054-A == B ?
题目及代码: 以字符串的形式给出A和B,判断A和B的数值是否相等。 没什么事,也就来看看以前没做出来的题目。这是大一的时候留下的题目了,当时怎么做都不对,后来才知道,直接想的太简单了,后来就放弃了。 现在可能这道题目,就知道是一道比较恶心的模拟题目了。 思路就是用两个栈分别来存两个数,当然需要有一下要注意的地方: 1.‘+原创 2015-03-22 20:12:02 · 793 阅读 · 0 评论