上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 40 下一页
摘要: Little penguin Polo has an n × m matrix, consisting of integers. Let's index the matrix rows from 1 to n from top to bottom and let's index the column 阅读全文
posted @ 2018-05-05 23:24 天之道,利而不害 阅读(290) 评论(0) 推荐(0) 编辑
摘要: Being a programmer, you like arrays a lot. For your birthday, your friends have given you an array a consisting of n distinct integers. Unfortunately, 阅读全文
posted @ 2018-05-05 22:24 天之道,利而不害 阅读(336) 评论(0) 推荐(0) 编辑
摘要: You have a rooted tree consisting of n vertices. Each vertex of the tree has some color. We will assume that the tree vertices are numbered by integer 阅读全文
posted @ 2018-05-03 15:58 天之道,利而不害 阅读(441) 评论(0) 推荐(0) 编辑
摘要: Given an array having N elements, each element is either -1 or 1. You have M queries, each query has two numbers L and R, you have to answer the lengt 阅读全文
posted @ 2018-04-26 15:11 天之道,利而不害 阅读(366) 评论(0) 推荐(0) 编辑
摘要: 借鉴了巨巨的代码,学会看数据量。 题解:预处理得到每个Val的所有合约数,因为最大的Val才10000。然后在DFS的过程中,对每个节点u,先减去已经存在的u的合约数个数,当回溯到这个节点u的时候,加上u的合约数的个数(子树里面的合约数)。 阅读全文
posted @ 2018-04-21 12:57 天之道,利而不害 阅读(308) 评论(0) 推荐(0) 编辑
摘要: Problem Description Alice is so popular that she can receive many flowers everyday. She has N vases numbered from 0 to N-1. When she receive some flow 阅读全文
posted @ 2018-04-19 23:44 天之道,利而不害 阅读(369) 评论(0) 推荐(0) 编辑
摘要: 给定平面上若干矩形,求出被这些矩形覆盖过至少两次的区域的面积. Input输入数据的第一行是一个正整数T(1<=T<=100),代表测试数据的数量.每个测试数据的第一行是一个正整数N(1<=N<=1000),代表矩形的数量,然后是N行数据,每一行包含四个浮点数,代表平面上的一个矩形的左上角坐标和右下 阅读全文
posted @ 2018-04-18 22:49 天之道,利而不害 阅读(179) 评论(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 @ 2018-04-18 14:10 天之道,利而不害 阅读(158) 评论(0) 推荐(0) 编辑
摘要: A. Splits Let's define a split of n as a nonincreasing sequence of positive integers, the sum of which is n. For example, the following sequences are 阅读全文
posted @ 2018-04-18 12:41 天之道,利而不害 阅读(207) 评论(0) 推荐(0) 编辑
摘要: There is a company that has N employees(numbered from 1 to N),every employee in the company has a immediate boss (except for the leader of whole compa 阅读全文
posted @ 2018-04-16 23:58 天之道,利而不害 阅读(192) 评论(0) 推荐(0) 编辑
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 40 下一页