![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ZOJ
lilongmark
Work hard. Have fun. Make history.
展开
-
ZOJ 2886 — Look and Say(C++)
题目:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2886 分析: 对于每一个字符串中的字符,判断是否与之前的字符相同,如相同则计数加1,否则输出计数和之前的字符,记录新字符并重新计数。注意for循环外要输出最后的计数及字符。 C++实现: /* Sample Input 3 1223441原创 2014-03-22 14:55:54 · 970 阅读 · 0 评论 -
ZOJ 1879 — Jolly Jumpers(C++)
题目:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=1879 分析: 计算相邻整数之间的差值,对结果进行排序,然后与1-(n-1)逐一比较,如有不同则返回Not jolly。 C++实现: #include #include #include #include /* abs *原创 2014-03-22 15:06:43 · 1309 阅读 · 0 评论 -
ZOJ 3758 — Singles' Day(C++)
题目:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3758 分析: 主要是转换成十进制以及素数的判断,要使用unsigned long long(或unsigned __int64),范围为[0, 2^64)。 C++实现: /* Sample Input 3 3 2 4 2 1 10原创 2014-03-22 14:44:49 · 882 阅读 · 0 评论 -
ZOJ Monthly - 135 A + G
A 题目: Abs Problem Time Limit: 2 Seconds Memory Limit: 65536 KB Special Judge Alice and Bob is playing a game, and this time the game is all about the absolute value! Alice原创 2014-08-24 18:31:17 · 870 阅读 · 0 评论