环上子段和
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
题面背景
环上子段和
题目描述
给你一个序列 ,现在需要你求出它的最大子段和。
需要注意,这是一个首尾相接的环形序列,序列中的数不一定全是正数。
输入格式
第一行一个整数
第二行 个整数表示
输出格式
输出一个整数, 表示最大子段和
样例 #1
样例输入 #1
5
1 2 -3 -4 3
样例输出 #1
6
数据范围
- 对于 的数据,
- 对于 的数据,
2025北辰贺岁杯基础赛-(复现赛)
- Status
- Done
- Rule
- Ledo
- Problem
- 6
- Start at
- 2025-1-20 9:00
- End at
- 2025-2-22 17:00
- Duration
- 800 hour(s)
- Host
- Partic.
- 49