博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
nyoj-字和串之差
阅读量:4286 次
发布时间:2019-05-27

本文共 441 字,大约阅读时间需要 1 分钟。

#include
#include
#include
#include
#include
using namespace std;int dp[1000010];int main(){ int ncase; int num, temp; int max1, min1; scanf("%d", &ncase); while(ncase--) { memset(dp, 0, sizeof(dp)); scanf("%d", &num); dp[0] = 0; for(int i = 1; i <= num; ++i) { scanf("%d", &temp); dp[i] = dp[i - 1] + temp; } sort(dp, dp + num + 1); max1 = dp[num] - dp[0]; cout<
<

转载地址:http://hbsgi.baihongyu.com/

你可能感兴趣的文章
Code Frist for Mysql 实例
查看>>
Visual Studio 开源控件扩展 NuGet 常用命令及常用组件
查看>>
mysql局域网访问设置
查看>>
UEditor 编辑器跨域上传解决方法
查看>>
VisualSVN Server搭建SVN服务器
查看>>
AngularJs directive指令详解
查看>>
AngularJs directive-scope
查看>>
AngularJs directive-link实例
查看>>
Js实现Base64编码、解码
查看>>
AngularJs directive-scope双向绑定方法处理-实例2
查看>>
AngularJs Ajax分页控件
查看>>
LocalDB数据库修改排序规则,修复汉字变问号
查看>>
C# Json序列化工具--Newtonsoft.Json简介和使用
查看>>
EntityFramework中Json序列化的循环引用问题解决--Newtonsoft.Json
查看>>
AngularJs----ng-class
查看>>
Bootstrap3 datetimepicker控件的使用
查看>>
NodeJs常用链接整理
查看>>
Bootstrap model的使用及点击外部不消失
查看>>
Linq To Entity多条件or查询处理
查看>>
AngularJs ng-options
查看>>