摘要:
链接:https://www.nowcoder.com/acm/contest/202/F来源:牛客网 平衡二叉树,顾名思义就是一棵“平衡”的二叉树。在这道题中,“平衡”的定义为,对于树中任意一个节点,都满足左右子树的高度差不超过 d. 空树的高度定义为0,单个节点的高度为1,其他情况下树的高度定义 阅读全文
摘要:
Coach Pang and Uncle Yang both love numbers. Every morning they play a game with number together. In each game the following will be done: 1. Coach Pa 阅读全文
摘要:
There's a beach in the first quadrant. And from time to time, there are sea waves. A wave ( xx , yy ) means the wave is a rectangle whose vertexes are 阅读全文
摘要:
Problem Description There are n apples on a tree, numbered from 1 to n.Count the number of ways to pick at most m apples. Input The first line of the 阅读全文
摘要:
Chiaki has an n × m matrix A. Rows are numbered from 1 to n from top to bottom and columns are numbered from 1 to m from left to right. The element in 阅读全文
摘要:
Chiaki has n intervals and the i-th of them is [li, ri]. She wants to delete some intervals so that there does not exist three intervals a, b and c su 阅读全文
摘要:
Xzz is playing a MMORPG "human life". In this game, there are N different skills. Some skills may base on another skill. Learning skill will cost Xzz 阅读全文
摘要:
Problem Description There are N vertices connected by N−1 edges, each edge has its own length.The set { 1,2,3,…,N } contains a total of N! unique perm 阅读全文
摘要:
A positive integer number n is written on a blackboard. It consists of not more than 105 digits. You have to transform it into a beautiful number by e 阅读全文
摘要:
Oleg the client and Igor the analyst are good friends. However, sometimes they argue over little things. Recently, they started a new company, but the 阅读全文