ac1188.pas
来自「某牛人写的acm.tongji.edu.cn上大部分ac的代码,仅供学习研究,请」· PAS 代码 · 共 24 行
PAS
24 行
program tiu1188;
const
maxn=20000;
var
a:array[1..maxn]of shortint;
m,n,i,j,s,ans:longint;
begin
repeat
read(m,n);dec(n);
for i:=1 to n do read(a[i]);
for j:=2 to m do
for i:=1 to n do begin
read(s);
if s>a[i] then a[i]:=s;
end;
s:=0;ans:=0;
for i:=1 to n do begin
inc(s,a[i]);
if s<0 then s:=0 else if s>ans then ans:=s;
end;
writeln(ans);
until seekeof;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?