/*很简单的一题,求连续的m位,求总和最多的值,循环找一下,就出来了*/
#include<stdio.h>
int d[];
int main(int argc, char* argv[])
{
int t,i,j;
int n,m,sum,max;
while(scanf("%d",&t)!=EOF)
{
while(t--)
{
scanf("%d%d",&n,&m);
for(i=;i<n;i++)
scanf("%d",&d[i]); max=;
for(i=;i<n;i++)
{
sum=;
for(j=i;j<i+m;j++)
sum+=d[j%n];
if(max<sum)
max=sum;
}
printf("%d\n",max);
}
}
return ;
}

zoj 3714 Java Beans的更多相关文章

  1. [ACM_水题] ZOJ 3714 [Java Beans 环中连续m个数最大值]

    There are N little kids sitting in a circle, each of them are carrying some java beans in their hand ...

  2. java beans

    There are N little kids sitting in a circle, each of them are carrying some java beans in their hand ...

  3. java.lang.ClassCastException: sun.jdbc.odbc.JdbcOdbcStatement cannot be cast to java.beans.Statement

    当导入的包为:import java.sql.Statement;时,无任何错误 当导入的包为:import java.beans.Statement;时,出错

  4. SQLException: com.mchange.v2.c3p0.ComboPooledDataSource [ java.beans.IntrospectionException: java.lang.reflect.InvocationTargetException [numThreadsAwaitingCheckoutDefaultUser] ] has been closed()

    问题:Could not get JDBC Connection; nested exception is java.sql.SQLException: com.mchange.v2.c3p0.Com ...

  5. ZOJ3714:Java Beans

    There are N little kids sitting in a circle, each of them are carrying some java beans in their hand ...

  6. Freemaker的java.beans.IntrospectionException: type mismatch between read and write methods

    引言:freemaker在特定的spring以及jdk下的问题解决路径. 环境描述 spring 3.1.1, jdk1.8u80, freemake 2.3.19 错误信息描述: 严重: Excep ...

  7. java.beans.PropertyChangeListener

    import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.beans.P ...

  8. JSP中操作Java Beans

    以下内容引用自http://wiki.jikexueyuan.com/project/jsp/beans.html: JavaBean是在编写Java时专门创建的Java类,根据JavaBean AP ...

  9. Oracle EBS Form Builder使用Java beans创建窗体

    最近有个项目,需要研究一下Oracle的E-Business Sutie(EBS),对于以前没接触此套件的我来说,简直太痛苦了.在网上找了一堆资料,试着进行Form二次开发,也遇到各类奇葩问题.目前遇 ...

随机推荐

  1. SQL Server 完成性检查的顺序

    第一步: 默认值 第二步: 违反not null 限制 第三步: 判断check约束 第四步: 对引用表应用foreign key 检查 第五步: 对被引用表做 foreign key 检查 第六步: ...

  2. Oracle EBS-SQL (INV-1):库存货位列表.sql

    select inventory_location_id, organization_id, description, subinventory_code, segment1 inventory_lo ...

  3. Java安全学习

    http://blog.csdn.net/wbw1985/article/details/5506515 http://blog.csdn.net/wbw1985/article/details/60 ...

  4. fragment、ListFragment使用ListView及自定义Listview等初始化操作

    fragment.ListFragment使用ListView及自定义Listview等初始化操作 1.先说一下 从官方api中说fragment碎片中使用Listview有专门的 ListView碎 ...

  5. perl 升级到5.20版本

    不建议先rm 先下载tar.gz ...然後手动安装..default 安装到/usr/local/目录下.. 然後修改/usr/bin/perl的symbolic link到/usr/local/b ...

  6. storage theory

    preface/prehight:topic: Storage(share fileSystem(可共享文件系统,Access I/O existence bottleNeck,access read ...

  7. #include <array>

    array是静态数组,在栈上,不可以变长 vector比array更常用 不需要变长,容量较小,用array 需要变长,容量较大,用vector 1 array 1 array新数组 //std::a ...

  8. 关于 FPGA 和 外部芯片接口时序设计

    在看这篇文章之前, 建议先好好读下这篇文章.http://download.csdn.net/detail/angelbosj/8013827. 因为我不太会用 VISio.要是哪位网友能告诉我.怎么 ...

  9. Win10下Genymotion无法正常使用的解决方法

    原Win7下安装配置的genymotion正常使用,Eclipse的Genymotion插件也可以正常运行.系统升级后,忽然就不work了. 折腾了一天试了各种方式,网上的例子也五花八门.最后还是找到 ...

  10. VS2015使用scanf报错解决方案

    版权声明:本文为博主原创文章,未经博主允许不得转载. 方法一:在程序最前面加#define _CRT_SECURE_NO_DEPRECATE: 方法二:在程序最前面加#define _CRT_SECU ...