
set
文章平均质量分 55
ryo_218
要努力成为别人的依赖呀!
展开
-
第九届蓝桥杯省赛C++B组 日志统计
标题:日志统计 小明维护着一个程序员论坛。现在他收集了一份"点赞"日志,日志共有N行。其中每一行的格式是: ts id 表示在ts时刻编号id的帖子收到一个"赞"。 现在小明想统计有哪些帖子曾经是"热帖"。如果一个帖子曾在任意一个长度为D的时间段内收到不少于K个赞,小明就认为这个帖子曾是"热帖"。 具体来说,如果存在某个时刻T满足该帖在[T, T+D)这段时间内(注意是左闭右...原创 2018-04-04 22:06:08 · 2625 阅读 · 9 评论 -
PAT 1120 Friend Numbers (20)
1120 Friend Numbers (20)(20 分) Two integers are called "friend numbers" if they share the same sum of their digits, and the sum is their "friend ID". For example, 123 and 51 are friend numbers since ...原创 2018-08-08 17:42:14 · 138 阅读 · 0 评论 -
PAT 1002 A+B for Polynomials (25)
1002 A+B for Polynomials (25)(25 分) This time, you are supposed to find A+B where A and B are two polynomials. Input Specification: Each input file contains one test case. Each case occupies 2 line...原创 2018-08-29 22:17:45 · 158 阅读 · 0 评论 -
PAT 1021 Deepest Root (25)
1021 Deepest Root (25)(25 分) A graph which is connected and acyclic can be considered a tree. The hight of the tree depends on the selected root. Now you are supposed to find the root that results in...原创 2018-09-03 16:17:20 · 134 阅读 · 0 评论 -
第九届蓝桥杯省赛C++A组 第几个幸运数
标题:第几个幸运数 到x星球旅行的游客都被发给一个整数,作为游客编号。 x星的国王有个怪癖,他只喜欢数字3,5和7。 国王规定,游客的编号如果只含有因子:3,5,7,就可以获得一份奖品。 我们来看前10个幸运数字是: 3 5 7 9 15 21 25 27 35 45 因而第11个幸运数字是:49 小明领到了一个幸运数字 59084709587505,他去领奖的时候,人家要求他准确地...原创 2018-12-06 22:54:00 · 3121 阅读 · 1 评论