随笔分类 - C/C++
摘要:题目 A linked list consists of a series of structures, which are not necessarily adjacent in memory. We assume that each structure contains an integer k
阅读全文
摘要:题目 Given a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3, ..., N and pop randomly. You are supposed to tell if a give
阅读全文
摘要:题目 Given two strings S1 and S2 , S=S1 −S2 is defined to be the remaining string after taking all the characters in S2 from S1 . Your
阅读全文
摘要:题目 The task is simple: given any positive integer N, you are supposed to count the total number of 1's in the decimal form of the integers from 1 to N
阅读全文
摘要:题目 Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mall which
阅读全文
摘要:题目 Zhejiang University has 40,000 students and provides 2,500 courses. Now given the registered course list of each student, you are supposed to outpu
阅读全文
摘要:题目 The task is really simple: given N exits on a highway which forms a simple cycle, you are supposed to tell the shortest distance between any pair o
阅读全文
摘要:题目 Eva is trying to make her own color stripe out of a given one. She would like to keep only her favorite colors in her favorite order by cutting off
阅读全文
摘要:题目 Shopping in Mars is quite a different experience. The Mars people pay by chained diamonds. Each diamond has a value (in Mars dollars M$). When maki
阅读全文
摘要:题目 A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties: The left subtree of a node contains only nod
阅读全文
摘要:题目 Shuffling is a procedure used to randomize a deck of playing cards. Because standard shuffling techniques are seen as weak, and in order to avoid "
阅读全文
摘要:题目 Being unique is so important to people on Mars that even their lottery is designed in a unique way. The rule of winning is simple: one bets on a nu
阅读全文
摘要:题目 Given a string, you are supposed to output the length of the longest symmetric sub-string. For example, given Is PAT&TAP symmetric?, the longest sy
阅读全文
摘要:题目 Zhejiang University has 40000 students and provides 2500 courses. Now given the student name lists of all the courses, you are supposed to output t
阅读全文
摘要:题目 Given a collection of number segments, you are supposed to recover the smallest number from them. For example, given { 32, 321, 3214, 0229, 87 }, w
阅读全文
摘要:项目需求 设计要求 功能选择可以用菜单来实现,用户根据自己 的选择进入不同的菜单 程序不要求将信息保存到文件中,程序开始时职员信息为空,用户需要先增加职员信息,之后才可以实现查找、删除、浏览等功能。 职员信息的关键字为职员的职员号,加入时职员号重复的记录不能加入。查找删除按照职员号进行。 选择删除功
阅读全文
摘要:题目 The magic shop in Mars is offering some magic coupons. Each coupon has an integer N printed on it, meaning that when you use this coupon with a pro
阅读全文
摘要:题目 This time you are asked to tell the difference between the lowest grade of all the male students and the highest grade of all the female students.
阅读全文
摘要:题目 To prepare for PAT, the judge sometimes has to generate random passwords for the users. The problem is that there are always some confusing passwor
阅读全文
摘要:题目 One way that the police finds the head of a gang is to check people's phone calls. If there is a phone call between A and B, we say that A and B is
阅读全文

浙公网安备 33010602011771号