上一页 1 ··· 30 31 32 33 34 35 36 37 38 ··· 46 下一页
摘要: 推荐博客 : https://www.cnblogs.com/ice-wing/p/7709311.html 此类问题要解决的通常是 树上的某个点到另一个点的所有路径 差分 : 对于一个一维的数组,我们如果要改动态多次修改一个区间,比如给这个区间的所有值全部 加 1,那么我们是不在这个区间的头进行一 阅读全文
posted @ 2018-01-31 14:41 楼主好菜啊 阅读(210) 评论(0) 推荐(0)
摘要: Amr loves Chemistry, and specially doing experiments. He is preparing for a new interesting experiment. Amr has n different types of chemicals. Each c 阅读全文
posted @ 2018-01-31 10:17 楼主好菜啊 阅读(431) 评论(0) 推荐(0)
摘要: “今年暑假不AC?” “是的。” “那你干什么呢?” “看世界杯呀,笨蛋!” “@#$%^&*%...” 确实如此,世界杯来了,球迷的节日也来了,估计很多ACMer也会抛开电脑,奔向电视了。 作为球迷,一定想看尽量多的完整的比赛,当然,作为新时代的好青年,你一定还会看一些其它的节目,比如新闻联播(永 阅读全文
posted @ 2018-01-30 16:30 楼主好菜啊 阅读(144) 评论(0) 推荐(0)
摘要: Iahub and Sorin are the best competitive programmers in their town. However, they can't both qualify to an important contest. The selection will be ma 阅读全文
posted @ 2018-01-29 10:14 楼主好菜啊 阅读(183) 评论(0) 推荐(0)
摘要: 推荐博客 : https://www.cnblogs.com/zyxStar/p/4591897.html 问题描述 : 已知在平面上有散落的好多点,求相距最近的两个点的距离是多少 ? 一 、 穷举法 最暴力的解法,枚举出所有可能的点对,这样复杂度就是 n^2 二 、分治法 (复杂度 n*logn) 阅读全文
posted @ 2018-01-28 15:06 楼主好菜啊 阅读(222) 评论(0) 推荐(0)
摘要: Given a list of N integers with absolute values no larger than 10 15, find a non empty subset of these numbers which minimizes the absolute value of t 阅读全文
posted @ 2018-01-27 20:28 楼主好菜啊 阅读(386) 评论(0) 推荐(0)
摘要: 工大要建新教学楼了,一座很高很高的楼,它有n层。学校为了减少排电梯的队伍,建造了好多好多电梯,共有m个。为了让电梯有序,学校给每个电梯设定了独特的可停楼层,如 x1 x2 y1 y2 表示,x1楼层到x2楼层可停,y1楼层到y2楼层可停。然后其他楼层这个电梯都不停一天,yanga11ang想去顶层观 阅读全文
posted @ 2018-01-26 14:18 楼主好菜啊 阅读(325) 评论(0) 推荐(0)
摘要: You are given an array consisting of n non-negative integers a1, a2, ..., an. You are going to destroy integers in the array one by one. Thus, you are 阅读全文
posted @ 2018-01-25 15:17 楼主好菜啊 阅读(243) 评论(0) 推荐(0)
摘要: One beautiful July morning a terrible thing happened in Mainframe: a mean virus Megabyte somehow got access to the memory of his not less mean sister 阅读全文
posted @ 2018-01-20 17:18 楼主好菜啊 阅读(211) 评论(0) 推荐(0)
摘要: You have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number 阅读全文
posted @ 2018-01-20 09:13 楼主好菜啊 阅读(212) 评论(0) 推荐(1)
上一页 1 ··· 30 31 32 33 34 35 36 37 38 ··· 46 下一页