摘要: DescriptionInput输入文件的第1行包含两个数N和M,N表示初始时数列中数的个数,M表示要进行的操作数目。第2行包含N个数字,描述初始时的数列。以下M行,每行一条命令,格式参见问题描述中的表格。Output对于输入数据中的GET-SUM和MAX-SUM操作,向输出文件依次打印结果,每个答... 阅读全文
posted @ 2015-03-10 20:06 TCtower 阅读(400) 评论(0) 推荐(0) 编辑
摘要: 原帖:http://fanhq666.blog.163.com/blog/static/819434262011021105212299/你的Treap能支持以下操作吗?1.区间增减2.区间求最小3.区间反转(倒序)4.区间移动(把一段剪切、粘贴)不能?只能用splay?其实,Treap也可以办到。... 阅读全文
posted @ 2015-03-10 14:35 TCtower 阅读(253) 评论(0) 推荐(0) 编辑
摘要: DescriptionNewman likes playing with cats. He possesses lots of cats in his home. Because the number of cats is really huge, Newman wants to group som... 阅读全文
posted @ 2015-03-10 14:20 TCtower 阅读(314) 评论(0) 推荐(0) 编辑
摘要: DescriptionOur Black Box represents a primitive database. It can save an integer array and has a special i variable. At the initial moment Black Box i... 阅读全文
posted @ 2015-03-10 09:20 TCtower 阅读(195) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionSean owns a company and he is the BOSS.The other Staff has one Superior.every staff has a loyalty and ability.Some times Sean will ... 阅读全文
posted @ 2015-03-10 08:44 TCtower 阅读(244) 评论(0) 推荐(0) 编辑