Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so dont bother with any of their useless mail servers here and just use oauth login instead. Thank the nice Russians for causing that. :)

Paste

Pasted as Delphi by Croydon ( 16 years ago )
Procedure DiscoverSomethingInteresting(Input : Array Of Integer; Out x, y, z : Integer);
Var
    i, j, k : Integer;
    w       : Integer;
Begin
    z := -MaxInt;
    For i := 1 To Length(Input) Do
    Begin
        For j := 0 To Length(Input) - i Do
        Begin
            w := 0;
            For k := 0 To i - 1 Do
            Begin
                w := w + Input[j+k];
            End;
            If w > z Then
            Begin
                z       := w;
                x       := j;
                y       := j+i-1;
            End;
        End;
    End;
End;

 

Revise this Paste

Your Name: Code Language: