摘要: 总时间限制: 1000ms内存限制: 65536kB描述An army of ants walk on a horizontal pole of length l cm, each with a constant speed of 1 cm/s. When a wal... 阅读全文
posted @ 2018-03-14 21:02 ACLJW 阅读(127) 评论(0) 推荐(0) 编辑
摘要: Given a string, find the length of the longest substring without repeating characters.Examples:Given "abcabcbb", the answer is "abc", ... 阅读全文
posted @ 2018-03-12 08:34 ACLJW 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 11-散列1 电话聊天狂人(25 分)给定大量手机用户通话记录,找出其中通话次数最多的聊天狂人。输入格式:输入首先给出正整数N(≤10​5​​),为通话记录条数。随后N行,每行给出一条通话记录。简单起见,这里只列出拨出方和接收方的11位数字构成的手机号码,其中以空格分... 阅读全文
posted @ 2018-03-11 20:54 ACLJW 阅读(233) 评论(0) 推荐(0) 编辑
摘要: You are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of th... 阅读全文
posted @ 2018-03-11 20:06 ACLJW 阅读(89) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each inpu... 阅读全文
posted @ 2018-03-10 08:14 ACLJW 阅读(84) 评论(0) 推荐(0) 编辑
摘要: 10-排序6 Sort with Swap(0, i)(25 分)Given any permutation of the numbers {0, 1, 2,..., N−1}, it is easy to sort them in increasing order.... 阅读全文
posted @ 2018-03-06 22:25 ACLJW 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 10-排序5 PAT Judge(25 分)The ranklist of PAT is generated from the status list, which shows the scores of the submissions. This time you ... 阅读全文
posted @ 2018-03-03 12:42 ACLJW 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 10-排序4 统计工龄(20 分)给定公司N名员工的工龄,要求按工龄增序输出每个工龄段有多少员工。输入格式:输入首先给出正整数N(≤10​5​​),即员工总人数;随后给出N个整数,即每个员工的工龄,范围在[0, 50]。输出格式:按工龄的递增顺序输出每个工龄的员工个数... 阅读全文
posted @ 2018-03-02 23:57 ACLJW 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 09-排序3 Insertion or Heap Sort(25 分)According to Wikipedia:Insertion sort iterates, consuming one input element each repetition, and gr... 阅读全文
posted @ 2018-03-02 23:44 ACLJW 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 09-排序2 Insert or Merge(25 分)According to Wikipedia:Insertion sort iterates, consuming one input element each repetition, and growing a... 阅读全文
posted @ 2018-03-02 22:31 ACLJW 阅读(172) 评论(0) 推荐(0) 编辑