- 1、本文档共13页,可阅读全部内容。
- 2、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
ACM第3周周赛试题
A:Max Sum of Max-K-sub-sequence(3415)
Time Limit: 2000/1000 MS (Java/Others)????Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 525????Accepted Submission(s): 51
Problem Description
Given a circle sequence A[1],A[2],A[3]......A[n]. Circle sequence means the left neighbour of A[1] is A[n] , and the right neighbour of A[n] is A[1].Now your job is to calculate the max sum of a Max-K-sub-sequence. Max-K-sub-sequence means a continuous non-empty sub-sequence which length not exceed K.
?
Input
The first line of the input contains an integer T(1=T=100) which means the number of test cases. Then T lines follow, each line starts with two integers N , K(1=N=100000 , 1=K=N), then N integers followed(all the integers are between -1000 and 1000).
?
Output
For each test case, you should output a line contains three integers, the Max Sum in the sequence, the start position of the sub-sequence, the end position of the sub-sequence. If there are more than one result, output the minimum start position, if still more than one , output the minimum length of them.
?
Sample Input
4
6 3
6 -1 2 -6 5 -5
6 4
6 -1 2 -6 5 -5
6 3
-1 2 -6 5 -5 6
6 6
-1 -1 -1 -1 -1 -1
?
Sample Output
7 1 3
7 1 3
7 6 2
-1 1 1
B:Marriage Match IV
Time Limit: 2000/1000 MS (Java/Others)????Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 295????Accepted Submission(s): 38
Problem Description
Do not sincere non-interference。Like that show, now starvae also take part in a show, but it take place between city A and B. Starvae is in city A and girls are in city B. Every time starvae can get to city B and make a data with a girl he likes. But there are two problems with it, one is starvae must get to B within least time, its said that he must take a shortest path. Other is no road can be taken more than once. While the city starvae passed away can been taken more than once. So, under a good RP, starvae may have many chances to get to city B. But he dont know how many chances at most h
您可能关注的文档
- 2013年国考省考公务员申论必威体育精装版热点概要.doc
- 2013年国考真题打印版.docx
- 2013年国考面试重点突破.doc
- 2013年大学毕业生开题报告模板.doc
- 2013年国考行测答案(中版)下载.doc.doc
- 2013年大学生士兵考军校试题 政治基础训练(必威体育精装版整理).doc
- 2013年安徽会计从业考试《电算化》第三套测试卷.docx
- 2013年国考行测图形推理每日一练.doc
- 2013年山东省事业单位考试-马哲讲义.doc
- 2013年国考行测真题{最全版本}.doc
- 2024年全球及中国厕所占用传感器行业头部企业市场占有率及排名调研报告.docx
- 2024年全球及中国面团泵行业头部企业市场占有率及排名调研报告.docx
- 2024-2030全球针对性攻击防护服务行业调研及趋势分析报告.docx
- 2024-2030全球半导体设备用射频滤波器行业调研及趋势分析报告.docx
- 2024年全球及中国维生素B6片行业头部企业市场占有率及排名调研报告.docx
- 2024-2030全球汽车HBM芯片行业调研及趋势分析报告.docx
- 2024年全球及中国起泡奶精行业头部企业市场占有率及排名调研报告.docx
- 2024-2030全球镜头清洁喷雾行业调研及趋势分析报告.docx
- 2024年全球及中国变压器出线装置行业头部企业市场占有率及排名调研报告.docx
- 2024-2030全球手枪弹匣装弹器行业调研及趋势分析报告.docx
文档评论(0)