摘要: There is an apple tree outside of kaka's house. Every autumn, a lot of apples will grow in the tree. Kaka likes apple very much, so he has been carefu 阅读全文
posted @ 2019-06-01 20:39 cherish__lin 阅读(281) 评论(0) 推荐(0) 编辑
摘要: Long long ago, there is a sequence A with length n. All numbers in this sequence is no smaller than 1 and no bigger than n, and all numbers are differ 阅读全文
posted @ 2019-05-31 23:26 cherish__lin 阅读(132) 评论(0) 推荐(0) 编辑
摘要: We guessed some integer number xx. You are given a list of almost all its divisors. Almost all means that there are all divisors except 11and xx in th 阅读全文
posted @ 2019-05-16 22:47 cherish__lin 阅读(483) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://codeforces.com/gym/102190/attachments 题解:我们先将前5个点分别涂上红色或者绿色,使得这两棵树在5个点中都是连通,并不存在自环(建边方式不唯一,主要看自己怎么想的,只要满足题意即可)。那么从第6个点开始:分别找一个固定的点与该点连边即可。 阅读全文
posted @ 2019-05-02 11:25 cherish__lin 阅读(120) 评论(0) 推荐(0) 编辑
摘要: N wizards are attending a meeting. Everyone has his own magic wand. N magic wands was put in a line, numbered from 1 to n(Wand_i owned by wizard_i). A 阅读全文
posted @ 2019-04-12 23:33 cherish__lin 阅读(207) 评论(0) 推荐(0) 编辑
摘要: 二叉搜索树或者是一棵空树,或者是具有下列性质的二叉树: 若它的左子树不空,则左子树上所有结点的值均小于它的根结点的值;若它的右子树不空,则右子树上所有结点的值均大于它的根结点的值;它的左、右子树也分别为二叉搜索树。(摘自百度百科) 给定一系列互不相等的整数,将它们顺次插入一棵初始为空的二叉搜索树,然 阅读全文
posted @ 2019-03-26 13:45 cherish__lin 阅读(316) 评论(0) 推荐(0) 编辑
摘要: There are nn left boots and nn right boots. Each boot has a color which is denoted as a lowercase Latin letter or a question mark ('?'). Thus, you are 阅读全文
posted @ 2019-03-22 09:33 cherish__lin 阅读(548) 评论(0) 推荐(0) 编辑
摘要: 给定平面上若干矩形,求出被这些矩形覆盖过至少两次的区域的面积. Input输入数据的第一行是一个正整数T(1<=T<=100),代表测试数据的数量.每个测试数据的第一行是一个正整数N(1<=N<=1000),代表矩形的数量,然后是N行数据,每一行包含四个浮点数,代表平面上的一个矩形的左上角坐标和右下 阅读全文
posted @ 2019-03-20 17:12 cherish__lin 阅读(271) 评论(0) 推荐(0) 编辑
摘要: There are several ancient Greek texts that contain descriptions of the fabled island Atlantis. Some of these texts even include maps of parts of the i 阅读全文
posted @ 2019-03-20 09:28 cherish__lin 阅读(355) 评论(0) 推荐(0) 编辑