摘要: C. Ternary XOR time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output A number is ternary if it 阅读全文
posted @ 2020-05-14 13:06 yin101 阅读(140) 评论(0) 推荐(0)
摘要: For the given integer nn (n>2n>2) let's write down all the strings of length nn which contain n−2n−2 letters 'a' and two letters 'b' in lexicographica 阅读全文
posted @ 2020-05-14 12:04 yin101 阅读(149) 评论(0) 推荐(0)
摘要: 对于一颗有n个节点的二叉树,每个节点有2个指针域,共2n个指针域,使用n-1个指针域,二叉线索树便是将剩下的n+1个指针域也利用起来。 在普通二叉树中,我们仅知道一个节点的左右孩子,并不知道它的直接前驱节点和直接后驱节点,若能知道它的前驱节点和后去节,便可以将这个数据结构进行遍历,可极大的提高效率。 阅读全文
posted @ 2020-05-14 10:20 yin101 阅读(910) 评论(0) 推荐(0)