2018年8月的全部文章
@kidultff

PAT-A 真题 – 1113 Integer Set Partition

Given a set of N (>1) positive integers, you are supposed to partition them into two disjoint sets A1 and A2 of n1 and n2 numbers, respectively. Let S1 and S2&nb ...
  • 0
  • 0
@kidultff

PAT-A 真题 – 1112 Stucked Keyboard

On a broken keyboard, some of the keys are always stucked. So when you type some sentences, the characters corresponding to those keys will appear repeatedly on screen for k times.Now given a resulting string on screen, ...
  • 0
  • 0
@kidultff

PAT-A 真题 – 1109 Group Photo

Formation is very important when taking a group photo. Given the rules of forming K rows with N people as the following:The number of people in each row must be N/K (round down to the nearest integer ...
  • 0
  • 0
@kidultff

PAT-A 真题 – 1111 Online Map

Input our current position and a destination, an online map can recommend several paths. Now your job is to recommend two paths to your user: one is the shortest, and the other is the fastest. It is guaranteed that a path exists ...
  • 0
  • 0
@kidultff

PAT-A 真题 – 1107 Social Clusters

When register on a social network, you are always asked to specify your hobbies in order to find some potential friends with the same hobbies. A social cluster is a set of people who have some of their hobbies in common ...
  • 0
  • 0