【poj2761】 Feed the dogs】的更多相关文章

http://poj.org/problem?id=2761 (题目链接) 题意 求区间第K大. Solution 和poj2104一模一样. 主席树代码 // poj2761 #include<algorithm> #include<iostream> #include<cstdlib> #include<cstring> #include<cstdio> #include<cmath> #define LL long long #…
Description Wind loves pretty dogs very much, and she has n pet dogs. So Jiajia has to feed the dogs every day for Wind. Jiajia loves Wind, but not the dogs, so Jiajia use a special way to feed the dogs. At lunchtime, the dogs will stand on one line,…
Description 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 in a given interval. The other is to ask for the sum of numbers in a given interval. In…
http://poj.org/problem?id=2459 (题目链接) 题意 一堆不知何时运到的草料原有F1 kg,在第D天被牛吃成F2 kg,每头牛在[l,r]吃草料,每天吃1kg.求草料是什么时候运到的. Solution 原来这就是差分...将线段拆成点,权值为1(左端点)-1(右端点),那么离散端点后从左向右扫即可. 代码 // poj2459 #include<algorithm> #include<iostream> #include<cstdlib>…
                                                            Feed the dogs Time Limit: 6000MS   Memory Limit: 65536K Total Submissions: 20634   Accepted: 6494 Description Wind loves pretty dogs very much, and she has n pet dogs. So Jiajia has to feed…
本系列有五篇:分别是  [一]Ubuntu14.04+Jekyll+Github Pages搭建静态博客:主要是安装方面  [二]jekyll 的使用 :主要是jekyll的配置  [三]Markdown+jekyll在Gitpages上写blog的常用操作 :主要Markdown的使用 [四]搭建Markdown的编辑器 [五]将博客从jekyll迁移到了hexo     目录: 一.静态博客: 二.关于hexo和jekyll 三.Hero的安装 一.静态博客: 引用链接:https://ww…
目录(?)[-] htaccess 详解 htaccess rewrite 规则详细说明 RewriteEngine OnOff RewriteBase URL-path RewriteCond TestString CondPattern flags RewriteOptions Options RewriteRule Pattern Substitution flags redirectR code 强制重定向 redirect forbiddenF 强制URL为被禁止的 forbidden…
一.委托的基本的写法 internal class Program { private static void Main(string[] args) { ChainDelegate(); Console.ReadKey(); } public static void ChainDelegate() { //创建委托 Feedback feedbackToConsole = new Feedback(FeedbackToConsole); Feedback feedbackToMsBox = n…
Layout   Description Like everyone else, cows like to stand close to their friends when queuing for feed. FJ has N (2 <= N <= 1,000) cows numbered 1..N standing along a straight line waiting for feed. The cows are standing in the same order as they…
正则表达式中的特殊字符 字符 含意 \ 做为转意,即通常在"\"后面的字符不按原来意义解释,如/b/匹配字符"b",当b前面加了反斜杆后/\b/,转意为匹配一个单词的边界. -或- 对正则表达式功能字符的还原,如"*"匹配它前面元字符0次或多次,/a*/将匹配a,aa,aaa,加了"\"后,/a\*/将只匹配"a*". ^ 匹配一个输入或一行的开头,/^a/匹配"an A",而不匹配&q…