Skip to content

Commit 76a6bad

Browse files
committedMar 23, 2012
Lines - code fixes
1 parent 828fd23 commit 76a6bad

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed
 

‎lines/lines.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,15 @@ int main() {
1717

1818
L[ 0 ] = 0;
1919
for ( i = 1; i <= N; ++i ) {
20-
nline[ i ] = C * C * N;
20+
nline[ i ] = C * C * N; //initialization
2121
fscanf( in, "%s\n", word );
2222
L[ i ] = strlen( word );
23-
2423
j = i;
2524
left = C - L[ j ];
2625
while ( left >= 0 && j > 0 ) {
2726
w = left * left;
2827
w += nline[ j - 1 ];
2928
nline[ i ] = min( nline[ i ], w );
30-
3129
--j;
3230
left -= L[ j ] + 1;
3331
}

0 commit comments

Comments
 (0)
Please sign in to comment.