摘要: Problem DescriptionCrixalis - Sand King used to be a giant scorpion(蝎子) in the deserts of Kalimdor. Though he's a guardian of Lich King now, he keeps the living habit of a scorpion like living underground and digging holes.Someday Crixalis decides to move to another nice place and build a new ho 阅读全文
posted @ 2014-02-26 20:39 漏网的鱼 阅读(168) 评论(0) 推荐(0) 编辑
摘要: shǎ崽 OrOrOrOrzTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3358 Accepted Submission(s): 1060Problem DescriptionAcmer in HDU-ACM team are ambitious, especially shǎ崽, he can spend time in Internet bar doing problems overnight. So many girls want. 阅读全文
posted @ 2014-02-25 13:30 漏网的鱼 阅读(314) 评论(0) 推荐(0) 编辑
摘要: #include#includestruct stu{ char id[21]; int ac; int finalscore; }; struct stu stud[1001]; struct stu snew[1001];void sortdata(stu[1000],int);int main(){ int sco[100]; int s,p,sc,timu; while(scanf("%d",&s)&&s){ scanf("%d%d",&p,&sc); for(int i=0;... 阅读全文
posted @ 2014-02-23 19:48 漏网的鱼 阅读(902) 评论(0) 推荐(0) 编辑
摘要: 内存是计算机的敏感资源,熟练掌握对内存的操作是一个优秀程序员必备的素质,但是很多人对于如何对代码和代码数据中的数据分配很困惑,由此我查看了linux_c程序设计大全这本书 和一边博客文章。首先对于数据的内部存储,众所周知,不同的数据类型所占用的空间是不同的。比如char 是一个byte,int是4个bytes等等。另外还需只要的是小端存储和大端存储。所谓小端存储是数据的最低位存储在内存中的低地址处,大端则相反。举个例子,int a=0x12345678.这个是4个字节吧,那么从内存的低地址开始存的是78这一个字节,然后是‘56’这个字节,最高一个字节是‘12’.由于没有图,只能这么说,地址(高 阅读全文
posted @ 2014-02-22 13:48 漏网的鱼 阅读(197) 评论(0) 推荐(0) 编辑
摘要: 今年暑假不AC Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 2063 Accepted Submission(s): 1137Problem Description“今年暑假不AC?” “是的。” “那你干什么呢?” “看世界杯呀,笨蛋!” “@#$%^&*%...”确实如此,世界杯来了,球迷的节日也来了,估计很多ACMer也会抛开电脑,奔向电视了。 作为球迷,一定想看尽量多的完整的比赛,当然,作为新时代的好青年,你一定还会看一 阅读全文
posted @ 2014-02-18 14:49 漏网的鱼 阅读(668) 评论(0) 推荐(1) 编辑
摘要: InputThere will be several test cases; each case input contains two integers N and M, which satisfy the relationship: 1 #includeint main(){ int m,n,r=1; while(scanf("%d%d",&m,&n)!=0&&(m!=-1||n!=-1)){ while(m%n!=0){ r=m%n; m=n; n=r;} if(n==1) printf("YES\n"); else 阅读全文
posted @ 2014-02-16 20:03 漏网的鱼 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 思想核心是如何维护一个单调队列,合理应用单调队列简化问题下面是摘抄:单调队列及其应用原创是我可敬的师傅,搜索到的上面那个应该就是原文. 单调队列及其应用 单调队列,望文生义,就是指队列中的元素是单调的。如:{a1,a2,a3,a4……an}满足a1mid do dec(j); 21 if ij; 30 if i>2;//保证程序在需要的地方停止,由于要选极小值 40 sort(1,n); 41 a[n+1]:=maxlongint>>2;//作用同上 42 a[n+2]:=maxlongint>>2; 43 h1:=1; 44 h2:=1; 45 t2:=0... 阅读全文
posted @ 2014-02-16 16:25 漏网的鱼 阅读(229) 评论(0) 推荐(0) 编辑
摘要: 如杭电acm题目The input contains several test cases. The first line of the input is a single integer T which is the number of test cases. T test cases follow. Each test case contains a single line with several words. There will be at most 1000 characters in a line.OutputFor each test case, you should outp 阅读全文
posted @ 2014-02-16 16:21 漏网的鱼 阅读(175) 评论(0) 推荐(0) 编辑