23
15
u/w3woody Mar 10 '18 edited Mar 11 '18
Here, let me give the formatting a go.
b = 0
; e = 0
; max = 0 // pierwsze przyblizenie
; for ( i = 0
; i < n
; i++ ) // poczatek podtablicy
{ sum = 0
; for ( j = i
; j < n
; j++ ) // koniec podtablicy
{ sum = sum + a[j]
; if (sum > max)
{ max = sum
; b = i
; e = j
;}}}4
10
18
6
9
4
1
1
-12
u/Negatratoron Mar 10 '18
never use indentation, especially in tight loops
10
u/w3woody Mar 10 '18
Absolutely. The indentation makes the loops unbalanced, and can in severe cases cause the server to wobble.
4
u/hexane360 Mar 11 '18
Did this sub collectively forget what it's supposed to be about?
0
Mar 11 '18
[deleted]
2
u/hexane360 Mar 11 '18
The difference is your comment was either serious or just horribly horribly unfunny. People took pity on you and assumed the former, and proceeded to have a serious discussion. Also you have no idea what a brigade is.
0
Mar 10 '18
[deleted]
17
u/walterbanana Mar 10 '18
You can configure tab width in your editor, though. With spaces you are stuck the whatever amount of spaces were used.
0
Mar 10 '18
[deleted]
0
Mar 10 '18
[deleted]
0
Mar 10 '18
[deleted]
2
u/papa420 Mar 10 '18 edited Jan 23 '24
absurd quarrelsome degree outgoing violet chase silky north husky wipe
This post was mass deleted and anonymized with Redact
0
40
u/playr_4 Mar 10 '18
I think the thing that's killing me the most is actually that the comments aren't at the same indent.