## PAT 1127. ZigZagging on a Tree (30)-甲级

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 and inorder traversal sequences. And it is a simple standard routine to print the numbers in level-order. However, if you think the problem is too simple, th[……]

## 1106. Lowest Price in Supply Chain (25)-PAT甲级真题(dfs,bfs,树的遍历)

A supply chain is a network of retailers（零售商）, distributors（经销商）, and suppliers（供应商）– everyone involved in moving a product from supplier to customer.

Starting from one root supplier, everyone on the chain buys products from one’s supplier in a price P and sell or distribute them in a price that is[……]

## 1111. Online Map (30)-PAT甲级真题（Dijkstra + DFS）

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 for any request.

#### Input Specification:

Each input file contains one te[……]

## PAT1115 Counting Nodes in a BST (30)-PAT甲级真题（二叉树的遍历，dfs）

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 nodes with keys less than or equal to the node’s key.
• The right subtree of a node contains only nodes with keys greater than the node’s key.
• Both the left[……]

## PAT 1131. Subway Map (30) -甲级（图的遍历，DFS）

In the big cities, the subway systems always look so complex to the visitors. To give you some sense, the following figure shows the map of Beijing subway. Now you are supposed to help people with your computer skills! Given the starting position of your user, your task is to find the quickest way t[……]

## PAT1130（DFS）

Given a syntax tree (binary), you are supposed to output the corresponding infix expression, with parentheses reflecting the precedences of the operators.

#### Input Specification:

Each input file contains one test case. For each case, the first line gives a positive integer N ( <= 20 ) which is the[……]

## 配置多个wordpress（通过新建目录的方法）

### 1、创建数据库和赋权用户

mysql> CREATE DATABASE wordpress数据库名 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
mysql> GRANT ALL ON wordwordpress数据库名.* TO '用户名'@'localhost' IDENTIFIED BY '密码';


mysql> FLUSH PRIVILEGES;
mysql> EXIT;


[……]

## wordpress修改端口

### 1、修改nginx的端口监听

vi /etc/nginx/sites-enabled/default
listen改成目标端口

### 2、修改wordpress数据库默认连接端口

mysql -u root -p
>use wordpress;
>select * from wp_options where option_name in ('siteurl','home');


update wp_options set option_value=’example.com:port’ where option_name i[……]