摘要: 问题描述在横轴上放了n个相邻的矩形,每个矩形的宽度是1,而第i(1 ≤ i ≤ n)个矩形的高度是hi。这n个矩形构成了一个直方图。例如,下图中六个矩形的高度就分别是3, 1, 6, 5, 2, 3。请找出能放在给定直方图里面积最大的矩形,它的边要与坐标轴平行。对于上面给出的例子,最大矩形如下图所示... 阅读全文
posted @ 2014-12-13 22:37 围剿大叔 阅读(577) 评论(0) 推荐(0) 编辑
摘要: 问题描述每一本正式出版的图书都有一个ISBN号码与之对应,ISBN码包括9位数字、1位识别码和3位分隔符,其规定格式如“x-xxx-xxxxx-x”,其中符号“-”是分隔符(键盘上的减号),最后一位是识别码,例如0-670-82162-4就是一个标准的ISBN码。ISBN码的首位数字表示书籍的出版语... 阅读全文
posted @ 2014-12-13 22:22 围剿大叔 阅读(1206) 评论(0) 推荐(0) 编辑
摘要: 问题描述给定n个正整数,找出它们中出现次数最多的数。如果这样的数有多个,请输出其中最小的一个。输入格式输入的第一行只有一个正整数n(1 ≤ n ≤ 1000),表示数字的个数。输入的第二行有n个整数s1, s2, …, sn (1 ≤ si ≤ 10000, 1 ≤ i ≤ n)。相邻的数用空格分隔... 阅读全文
posted @ 2014-12-13 22:00 围剿大叔 阅读(488) 评论(0) 推荐(0) 编辑
摘要: 欢迎访问www.liuchengqi.com 阅读全文
posted @ 2013-12-14 00:36 围剿大叔 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 在ubuntu中一些自己安装的程序没有创建快捷方式,每次都通过绝对路径执行比较复杂,可以通过自己创建快捷方式在桌面上,这样方便了每次的启动。我是给chrome创建的快捷方式,在这里和大家分享一下。 首先将下面的代码复制到一个文件中,文件名的格式为:xxxx.desktop . xxxx为你随意取的名字,以简单易懂为原则。一般就是程序的名字。 [Desktop Entry] Categories=Development; Comment[zh_CN]= Comment= Exec=/usr/bin/google-chrome GenericName[zh_CN]=Chrome G... 阅读全文
posted @ 2013-11-28 01:27 围剿大叔 阅读(307) 评论(0) 推荐(0) 编辑
摘要: 苹果iPhone5s/5c破解中移动3G TD网络教程最近几天关于港行iPhone 5S和iPhone 5C用上移动3G网络的消息不胫而走,最终的事实证明港行iPhone 5S/5C在经过简单的破解之后是能够支持移动3G网络的。那么它究竟是怎么破解的呢?目前网上对于破解基本上有两种说法,一是刷入移动正在测试中的固件,让港行iPhone 5S/5C拥有支持TD网络的能力;二是通过写卡或者卡贴加入特定的IMSI码,以上两种方法据说都能够让港行iPhone5s/5c用上移动3G网络。那么究竟如何实施呢?看完下面简单的教程你就明白了。首先是写入IMSI码教程:1、解卡(这个步骤就不详细讲了,感兴趣的可 阅读全文
posted @ 2013-10-28 22:21 围剿大叔 阅读(330) 评论(0) 推荐(0) 编辑
摘要: apt-get出现E:Encountered a section with no Package: header……的解决方法E:Encountered a section with no Package: header, E:Problem with MergeList /var/lib/apt/lists/******刚由于lists中某一个文件没有下载完成,出现解析错误。可用的解决方案:将/var/lib/apt/lists/下的所有list文件都删除,然后再update即可,命令如下:sudo rm /var/lib/apt/lists/* -vfsudo apt-get update 阅读全文
posted @ 2013-10-27 10:31 围剿大叔 阅读(356) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #define MAX 100010using namespace std;int n,k,qr,ql,v,p;int father[MAX*4];char str[MAX * 4];int query(int o,int l,int r){ int m = (l+r) / 2; int ans = 1; if(ql 0) father[o] = 1; else if(t==0) father[o] = 0; else if(t 0)... 阅读全文
posted @ 2013-10-27 00:55 围剿大叔 阅读(371) 评论(0) 推荐(0) 编辑
摘要: Heidi has a discrete analog clock in the shape of a circle, as the one in the gure. Two hands rotatearound the center of the circle, indicating hours and minutes. The clock has 60 marks placed aroundits perimeter, with the distance between consecutive marks being constant.The minute hand moves from. 阅读全文
posted @ 2013-10-26 21:57 围剿大叔 阅读(344) 评论(0) 推荐(0) 编辑
摘要: #include#includeusing namespace std;#define VEX 5//定义结点的个数#define maxpoint 100double graph[][maxpoint]={ { 0 , 10 , -1 , 30 , 100 }, { -1 , 0 , 50 , -1 , -1 } , { -1 , -1 , 0 , -1 , 10 } , { -1 , -1 , 20 , 0 , 60 } , { -1 , -1 , -1 , -1 , 0 }}; //邻接矩阵int i,j;int main(){ int R[maxp... 阅读全文
posted @ 2013-10-25 17:01 围剿大叔 阅读(587) 评论(0) 推荐(0) 编辑