ZOJ List the Books 水~】的更多相关文章

http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1727 题目大意: 给你书名.出版时间.价格,让你按照一定的顺序排序.. 其中题目会给出优先级最高的,剩下两个按书名优先级>出版时间>价格来排序. 思路: 练习sort重载的... 不过sort(book,book+n,cmp_by_name);的重载函数竟然不能用引用..不然会cp好吧,我习惯写重载<运算符了. #include<cstdio> #incl…
两题水题: 1.如果一个数能被分解为两个素数的乘积,则称为Semi-Prime,给你一个数,让你判断是不是Semi-Prime数. 2.定义F(0) = 7, F(1) = 11, F(n) = F(n-1) + F(n-2) (n>=2) 让你判断第n项是否能被3整除. 1.ZOJ 2723 Semi-Prime http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1723 打表即可. #include<cstdio>…
水 Information Entropy Time Limit: 2 Seconds      Memory Limit: 65536 KB      Special Judge Information Theory is one of the most popular courses in Marjar University. In this course, there is an important chapter about information entropy. Entropy is…
水 Average Score Time Limit: 2 Seconds      Memory Limit: 65536 KB Bob is a freshman in Marjar University. He is clever and diligent. However, he is not good at math, especially in Mathematical Analysis. After a mid-term exam, Bob was anxious about hi…
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=3702 题目大意: 对于给定的一个字符串,满足如下要求输出AC,否则WA(好吧我简写) 给定字符串只有ZOJ三个字母组成.Z和J只能有一个并且Z在左边 J之后的O个数必须大于Z之前的O个数 Z和J之间O的个数必须不大于J之后的O的个数,并且他们都大于0 #include<cstdio> #include<cstring> const int MAXN=1001;…
再水一发,舍友肿么还在睡T T. ---------------------------------舍友还在睡觉的分割线--------------------------------- http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=3200 大意:给你一串字符串,要求你按'Z''O''J''7'+'其他字符'排好序. 代码不太美观.不过还好啦. 不要像题目说的那样傻傻的排序,直接数个数就可以啦.输出的时候不是那四个字母就输…
啦啦啦,水一发准备去复习功课~ ------------------------------------------水一发的分割线------------------------------------------ http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1514 水题,没有一次AC我很惭愧,竟然忘了输出总共的个数..... #include<cstdio> #include<cstring> const…
Information Entropy Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3827 Description Information Theory is one of the most popular courses in Marjar University. In this course, there is an impo…
传送门:Zoj2002 题目大意:从左到右把一排数字k分,得到最小化最大份,如果有多组解,左边的尽量小. 思路:贪心+二分(参考青蛙过河). 方向:从右向左. 注意:有可能最小化时不够k分.如                                     3 3                            1 2 3   k分得到最小化的最大值是3,分组却只能分两个组.    错误结果是 1 2 / 3.正确结果是1 / 2 / 3   因此要从左到右补齐'/' #inclu…
GCD Reduce Time Limit: 2 Seconds      Memory Limit: 65536 KB      Special Judge You are given a sequence {A1, A2, ..., AN}. You task is to change all the element of the sequence to 1 with the following operations (you may need to apply it multiple ti…