摘要: Petya and Vasya are competing with each other in a new interesting game as they always do. At the beginning of the game Petya has to come up with an a 阅读全文
posted @ 2020-05-17 12:18 yin101 阅读(366) 评论(0) 推荐(0)
摘要: B. Young Explorers time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Young wilderness expl 阅读全文
posted @ 2020-05-17 11:14 yin101 阅读(520) 评论(0) 推荐(0)
摘要: You are given an array aa of length nn consisting of zeros. You perform nn actions with this array: during the ii-th action, the following sequence of 阅读全文
posted @ 2020-05-15 21:23 yin101 阅读(236) 评论(0) 推荐(0)
摘要: You are given a board of size n×nn×n, where nn is odd (not divisible by 22). Initially, each cell of the board contains one figure. In one move, you c 阅读全文
posted @ 2020-05-15 21:09 yin101 阅读(435) 评论(0) 推荐(0)
摘要: You are given two arrays aa and bb both consisting of nn positive (greater than zero) integers. You are also given an integer kk. In one move, you can 阅读全文
posted @ 2020-05-15 20:56 yin101 阅读(348) 评论(0) 推荐(0)
摘要: time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You are given two integers nn and mm. You 阅读全文
posted @ 2020-05-15 20:52 yin101 阅读(225) 评论(0) 推荐(0)
摘要: 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)