PYRAMID2 - Duyệt binh
Tác giả: flashmt
Ngôn ngữ: Pascal
var a:ansistring;
x,y,i,n,re,dem:longint;
begin
readln(n);
readln(a);
for i:=1 to n do
if a[i]='<' then
begin
if (x>0) and (x+y>re) then re:=x+y;
inc(y);
dem:=dem+x;
end
else
begin
inc(x);
if y>0 then dec(y);
end;
writeln(re);
end.