摘要:一、题目 A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in moving a product from supplier to cus
阅读全文
摘要:一、题目 Among all the factors of a positive integer N, there may exist several consecutive numbers. For example, 630 can be factored as 3×5×6×7, where 5,
阅读全文
摘要:一、题目: 略 二、分析 使用BFS。 三、代码 #include <iostream> #include <vector> #include <queue> using namespace std; int M, N, L, T; struct core { bool value; bool vi
阅读全文
摘要:1103 Integer Factorization (30分) 一、题目 The K−P factorization of a positive integer N is to write N as the sum of the P-th power of K positive integers.
阅读全文
摘要:一、题意 A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in moving a product from supplier to cus
阅读全文
摘要:一、题意 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 n
阅读全文
摘要:一、题意 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 n
阅读全文
摘要:一、题意 Given any permutation of the numbers {0, 1, 2,..., N−1}, it is easy to sort them in increasing order. But what if Swap(0, *) is the ONLY operatio
阅读全文
摘要:一、题意 In graph theory, an Eulerian path is a path in a graph which visits every edge exactly once. Similarly, an Eulerian circuit is an Eulerian path w
阅读全文
摘要:一、题意 There is a classical process named partition in the famous quick sort algorithm. In this process we typically choose one element as the pivot. Th
阅读全文
摘要:一、题目 Suppose that all the keys in a binary tree are distinct positive integers. A unique binary tree can be determined by a given pair of postorder an
阅读全文
摘要:一、题目: 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
阅读全文
摘要:这是2018年9月8日PAT考试甲级第一题,当时看完题目什么思路也没有,就直接跳过做第二题(因为我看第二题还好多人做出来了)。最后终于有了思路,但是读题题意理解错了,原文是"at least one but not all the werewolves were lying"即只有一个狼人说谎,自己
阅读全文