上一页 1 ··· 32 33 34 35 36 37 38 39 40 ··· 49 下一页
摘要: PAT 1004. Counting Leaves (30) A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child 阅读全文
posted @ 2018-01-03 20:12 A-Little-Nut 阅读(111) 评论(0) 推荐(0) 编辑
摘要: PAT 1003. Emergency (25) As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered ci 阅读全文
posted @ 2018-01-03 18:30 A-Little-Nut 阅读(139) 评论(0) 推荐(0) 编辑
摘要: PAT 1002. A+B for Polynomials This time, you are supposed to find A+B where A and B are two polynomials. Input Each input file contains one test case. 阅读全文
posted @ 2018-01-02 10:20 A-Little-Nut 阅读(138) 评论(0) 推荐(0) 编辑
摘要: Calculate a + b and output the sum in standard format that is, the digits must be separated into groups of three by commas (unless there are less than 阅读全文
posted @ 2018-01-02 09:12 A-Little-Nut 阅读(135) 评论(0) 推荐(0) 编辑
摘要: Hashing Hard Version Given a hash table of size N, we can define a hash function . Suppose that the linear probing is used to solve collisions, we can 阅读全文
posted @ 2018-01-01 17:37 A-Little-Nut 阅读(629) 评论(0) 推荐(0) 编辑
摘要: QQ帐户的申请与登陆 实现QQ新帐户申请和老帐户登陆的简化版功能。最大挑战是:据说现在的QQ号码已经有10位数了。 输入格式: 输入首先给出一个正整数N(≤10^5,随后给出N行指令。每行指令的格式为:“命令符(空格)QQ号码(空格)密码”。其中命令符为“N”(代表New)时表示要新申请一个QQ号, 阅读全文
posted @ 2018-01-01 09:43 A-Little-Nut 阅读(533) 评论(0) 推荐(0) 编辑
摘要: Hashing The task of this problem is simple: insert a sequence of distinct positive integers into a hash table, and output the positions of the input n 阅读全文
posted @ 2017-12-31 22:23 A-Little-Nut 阅读(434) 评论(0) 推荐(0) 编辑
摘要: 电话聊天狂人 给定大量手机用户通话记录,找出其中通话次数最多的聊天狂人。 输入格式: 输入首先给出正整数N(≤10^5)​​,为通话记录条数。随后N行,每行给出一条通话记录。简单起见,这里只列出拨出方和接收方的11位数字构成的手机号码,其中以空格分隔。 输出格式: 在一行中给出聊天狂人的手机号码及其 阅读全文
posted @ 2017-12-31 20:19 A-Little-Nut 阅读(301) 评论(0) 推荐(0) 编辑
摘要: PAT 1080. MOOC期终成绩 对于在中国大学MOOC(http://www.icourse163.org/)学习“数据结构”课程的学生,想要获得一张合格证书,必须首先获得不少于200分的在线编程作业分,然后总评获得不少于60分(满分100)。总评成绩的计算公式为 G = (G期中x 40% 阅读全文
posted @ 2017-12-30 19:39 A-Little-Nut 阅读(407) 评论(0) 推荐(0) 编辑
摘要: PAT 1079. 延迟的回文数 给定一个 k+1 位的正整数 N,写成 ak...a1a0 的形式,其中对所有 i 有 0 0。N 被称为一个回文数,当且仅当对所有 i 有 ai = ak i。零也被定义为一个回文数。 非回文数也可以通过一系列操作变出回文数。首先将该数字逆转,再将逆转数与该数相加 阅读全文
posted @ 2017-12-30 16:28 A-Little-Nut 阅读(482) 评论(0) 推荐(0) 编辑
上一页 1 ··· 32 33 34 35 36 37 38 39 40 ··· 49 下一页