摘要:
Source: PAT A1148 Werewolf - Simple Version (20 分) Description: Werewolf(狼人杀) is a game in which the players are partitioned into two parties: the wer 阅读全文
摘要:
Source: PAT A1135 Is It A Red-Black Tree (30 分) Description: There is a kind of balanced binary search tree named red-black tree in the data structure 阅读全文
摘要:
Source: PAT A1137 Final Grading (25 分) Description: For a student taking the online course "Data Structures" on China University MOOC (http://www.icou 阅读全文
摘要:
Source: PAT A1138 Postorder Traversal (25 分) Description: Suppose that all the keys in a binary tree are distinct positive integers. Given the preorde 阅读全文
摘要:
Source: PAT A1128 N Queens Puzzle (20 分) Description: The "eight queens puzzle" is the problem of placing eight chess queens on an 8 chessboard so tha 阅读全文
摘要:
Date:2019-05-25 11:06:04 回溯法: 如果达到递归边界前的某层,由于事实导致无需任何一个子问题继续递归,便可以直接返回上一层 Description: 8*8的棋盘上任意放置八个皇后棋子,使得任意两个皇后不在同一行,同一列,同一对角线 Code: 阅读全文
摘要:
Source: PAT A1132 Cut Integer (20 分) Description: Cutting an integer means to cut a K digits lone integer Z into two integers of (K/2) digits long int 阅读全文
摘要:
Source: PAT_A1136 A Delayed Palindrome (20 分) Description: Consider a positive integer N written in standard notation with k+1 digits ai as ak⋯a 阅读全文
摘要:
Source: PAT A1140 Look-and-say Sequence (20 分) Description: Look-and-say sequence is a sequence of integers as the following: where D is in [0, 9] exc 阅读全文
摘要:
Source: PAT A1141 PAT Ranking of Institutions (25 分) Description: After each PAT, the PAT Center will announce the ranking of institutions based on th 阅读全文