Dropping tests Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 12187   Accepted: 4257 Description In a certain course, you take n tests. If you get ai out of bi questions correct on test i, your cumulative average is defined to be . Give…
const char*, char const*, char*const的区别问题几乎是C++面试中每次都会有的题目.  事实上这个概念谁都有只是三种声明方式非常相似很容易记混.  Bjarne在他的The C++ Programming Language里面给出过一个助记的方法:  把一个声明从右向左读.  char  * const cp; ( * 读成 pointer to )  cp is a const pointer to char  const char * p;  p is a…
E. Hanoi Factory time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Of course you have heard the famous task about Hanoi Towers, but did you know that there is a special factory producing the…
  spark可以通过交互式命令行及编程两种方式来进行调用: 前者支持scala与python 后者支持scala.python与java 本文参考https://spark.apache.org/docs/latest/quick-start.html,可作快速入门 再详细资料及用法请见https://spark.apache.org/docs/latest/programming-guide.html   建议学习路径: 1.安装单机环境:http://blog.csdn.net/jedia…
制作运行库 由于ubuntu的Qt运行库在/usr/local/Trolltech/Qt-4.7.3/下,由makefile可以看到引用运行库是 INCPATH = -I/usr//mkspecs/default -I. -I/usr//include/QtCore -I/usr//include/QtNetwork -I/usr//include/QtGui -I/usr//include -I. -I. -I. 因此如果将编译后的可执行文件在ZedBoard上运行,也许早在相应的路径下找到运…
全盘格式化,重装了Ubuntu和Windows,记录一下重新配置Ubuntu过程. //build-essential sudo apt-get install build-essential sudo apt-get install vim //input method sougou <span style="color:#33FF33;">sudo apt-get remove ibus</span> //去掉 sudo add-apt-repository…
Building Shops                                                             Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)                                                                                          …
Automatic Judge Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 16    Accepted Submission(s): 11 Problem Description Welcome to HDU to take part in the second CCPC girls' competition! A new a…
Coprime Sequence                                                        Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)                                                                                      Total S…
C. Cellular Network time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output You are given n points on the straight line - the positions (x-coordinates) of the cities and m points on the same line…
L2-003. 月饼 时间限制 100 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 陈越 月饼是中国人在中秋佳节时吃的一种传统食品,不同地区有许多不同风味的月饼.现给定所有种类月饼的库存量.总售价.以及市场的最大需求量,请你计算可以获得的最大收益是多少. 注意:销售时允许取出一部分库存.样例给出的情形是这样的:假如我们有3种月饼,其库存量分别为18.15.10万吨,总售价分别为75.72.45亿元.如果市场的最大需求量只有20万吨,那么我们最大…
The Happy Worm Time Limit: 5000MS Memory Limit: 131072K Total Submissions: 4698 Accepted: 1047 Description The Happy Worm lives in an m*n rectangular field. There are k stones placed in certain locations of the field. (Each square of the field is eit…
人活着系列之平方数 Time Limit: 1000ms Memory limit: 65536K 有疑问?点这里^_^ 题目描述 偶然和必然?命运与意志?生与死?理性与情感?价值与非价值?在"人活着是为什么?"的问题面前都变成无意义了.婚姻?家庭?事业?爱情?这何尝不是一种借口,去诠释活着的另外一种理由,听起来显得堂而皇之一点罢了.所以活着的同时,为什么不做一做平方数? 平方数是指可以写成某个整数的平方的数.例如1,4,9等.现在我们有20个平方数,它们分别是1^2,2^2,3^2,…
石子合并(一) 时间限制:1000 ms  |  内存限制:65535 KB 难度:3 描述     有N堆石子排成一排,每堆石子有一定的数量.现要将N堆石子并成为一堆.合并的过程只能每次将相邻的两堆石子堆成一堆,每次合并花费的代价为这两堆石子的和,经过N-1次合并后成为一堆.求出总的代价最小值. 输入 有多组测试数据,输入到文件结束. 每组测试数据第一行有一个整数n,表示有n堆石子. 接下来的一行有n(0< n <200)个数,分别表示这n堆石子的数目,用空格隔开 输出 输出总代价的最小值,…
我们经常用的main函数都是不带参数的.因此main 后的括号都是空括号.实际上,main函数可以带参数,这个参数可以认为是 main函数的形式参数.C语言规定main函数的参数只能有两个, 习惯上这两个参数写为argc和argv.因此,main函数的函数头可写为: main (argc,argv)C语言还规定argc(第一个形参)必须是整型变量,argv( 第二个形参)必须是指向字符串的指针数组.加上形参说明后,main函数的函数头应写为: main (argc,argv) int argv;…
这几天,网上传来一个消息,虽然不知是好是坏,Win10可以下载安装了! 出于好奇,下载尝鲜,几个截图,留作纪念~ 中文,还是要好好支持的,毕竟中国有如此多的用户 可选的安装版本 许可条款也刚刚出炉,估计还热乎着 安装过程中的等待 网上公布的安装秘钥,VMware虚拟机安装,竟然验证不通过,不过不要紧,只是尝鲜,完全可以跳过的 简约的风格,扁平化的体现? 默认的桌面,有种打开窗户看世界的感觉 很早就放出新闻的Edge浏览器,的确完全打破了IE的风格.不过,Win10除了Edge浏览器,还可以选择I…
==============NSArray(不可变数组)=========== NSArray,继承自NSObject  用来管理(储存)一些有序的对象,不可变数组. 创建一个空数组 NSArray *array1=[[NSArray alloc]init];               //NSArray *array2=[NSArray array]; nil   数组结束标志 NSArray *array3=[[NSArray alloc]initWithObjects:@"rose&qu…
Cow Acrobats Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 4998   Accepted: 1892 Description Farmer John's N (1 <= N <= 50,000) cows (numbered 1..N) are planning to run away and join the circus. Their hoofed feet prevent them from tig…
Monthly Expense Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 25959   Accepted: 10021 Description Farmer John is an astounding accounting wizard and has realized he might run out of money to run the farm. He has already calculated and…
敌兵布阵 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 78575    Accepted Submission(s): 33192 Problem Description C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了.A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务…
QS Network Time Limit: 2 Seconds      Memory Limit: 65536 KB Sunny Cup 2003 - Preliminary Round April 20th, 12:00 - 17:00 Problem E: QS Network In the planet w-503 of galaxy cgb, there is a kind of intelligent creature named QS. QScommunicate with ea…
The battle near the swamp Gungan: Jar Jar, usen da booma!  Jar Jar: What? Mesa no have a booma!  Gungan: Here. Taken dis one. In the battle with the Trade Federation, Queen Amidala decided to ask gungans for help. Jar Jar Binks escorted the Queen and…
DNA sequence Time Limit : 15000/5000ms (Java/Other)   Memory Limit : 32768/32768K (Java/Other) Total Submission(s) : 15   Accepted Submission(s) : 7 Font: Times New Roman | Verdana | Georgia Font Size: ← → Problem Description The twenty-first century…
Bubble Shooter Time Limit : 2000/1000ms (Java/Other)   Memory Limit : 65536/32768K (Java/Other) Total Submission(s) : 3   Accepted Submission(s) : 3 Font: Times New Roman | Verdana | Georgia Font Size: ← → Problem Description Bubble shooter is a popu…
胜利大逃亡(续) Time Limit : 4000/2000ms (Java/Other)   Memory Limit : 65536/32768K (Java/Other) Total Submission(s) : 3   Accepted Submission(s) : 3 Font: Times New Roman | Verdana | Georgia Font Size: ← → Problem Description Ignatius再次被魔王抓走了(搞不懂他咋这么讨魔王喜欢)…
火影忍者之-静音 传说中的火之国一年一度的公务员选拔又开始了!木叶忍者村此次也要从中选拔出5人来,作为即将上任的新火影纲手的小弟-,可是报考公务员的人数实在是太--多啦!所以纲手的贴身随从-静音小姐,决定对这写人进行分m批的选拔,每次笔试n人,第一次选出5人,之后每次从这n人与之前参加笔试但未选中的人一起再选出分数最高的5人,如果分数相同则按名字的字典序选择,这样下来可以刷掉一大批人,但纲手只需要5人,这时候就轮到静音小姐的跟班小弟--卡卡西,来将这些人再进行二次筛选,卡卡西决定对这些人进行忍术…
总结: 1.B+树将数据完全排序,读数据时很快,但当要修改数据时,就需要将新入数据下面的数据重新排位,特别是当写入的数据排在较高的位置时,需要大量的移位操作才能完成写入. 2.SLM牺牲部分的读性能,从而提高写性能:将数据分散到多个有序列表中,每个列表保存一部分数据,这样读取数据时,就需要先查找在哪个有序列表,再从这个列表中读取具体数据,但是写的时候,受影响的数据就会减少,从而减少写入时间. 有以下2种方法优化读取时间: (1)Bloom filter : 就是个带随即概率的bitmap,可以快…
Description 一棵树上有n个节点,编号分别为1到n,每个节点都有一个权值w.我们将以下面的形式来要求你对这棵树完成一些操作: I. CHANGE u t : 把结点u的权值改为t II. QMAX u v: 询问从点u到点v的路径上的节点的最大权值 III. QSUM u v: 询问从点u到点v的路径上的节点的权值和 注意:从点u到点v的路径上的节点包括u和v本身 Input 输入的第一行为一个整数n,表示节点的个数.接下来n – 1行,每行2个整数a和b,表示节点a和节点b之间有一条…
Pots Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 11885 Accepted: 5025 Special Judge Description You are given two pots, having the volume of A and B liters respectively. The following operations can be performed: FILL(i) fill the pot i…
Sequence Time Limit: 6000MS Memory Limit: 65536K Total Submissions: 8277 Accepted: 2708 Description Given m sequences, each contains n non-negative integer. Now we may select one number from each sequence to form a sequence with m integers. It's clea…