Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
gzshawnliang committed Aug 13, 2019
1 parent 2c4927c commit d214675
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 10 deletions.
4 changes: 2 additions & 2 deletions myCpps/stringDistanceAndTransformProcess_UVA526.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ int main()
{
dp[i][0] = i;
posAdd[i][0] = -1 * i;
f[i][0] = _node(2, i, '~', i - 1, 0);
f[i][0] = _node(2, i + posAdd[i - 1][0], '~', i - 1, 0);
}

for (int j = 1; j <= sizeB; ++j)
{
dp[0][j] = j;
posAdd[0][j] = j;
f[0][j] = _node(1, j, b[j], 0, j - 1);
f[0][j] = _node(1, 1 + posAdd[0][j - 1], b[j], 0, j - 1);
}

for (int i = 1; i <= sizeA; ++i)
Expand Down
6 changes: 4 additions & 2 deletions myCpps/stringDistanceAndTransformProcess_UVA526.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
=
@VH
AAAAAAAA


AAAAAAAA
23 changes: 19 additions & 4 deletions myCpps/stringDistanceAndTransformProcess_UVA526.out
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
3
1 Replace 1,@
2 Insert 2,V
3 Insert 3,H
8
1 Delete 1
2 Delete 1
3 Delete 1
4 Delete 1
5 Delete 1
6 Delete 1
7 Delete 1
8 Delete 1

8
1 Insert 1,A
2 Insert 2,A
3 Insert 3,A
4 Insert 4,A
5 Insert 5,A
6 Insert 6,A
7 Insert 7,A
8 Insert 8,A
4 changes: 2 additions & 2 deletions myCpps/stringDistanceAndTransformProcess_UVA526OJ.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ int main()
{
dp[i][0] = i;
posAdd[i][0] = -1 * i;
f[i][0] = _node(2, i, '~', i - 1, 0);
f[i][0] = _node(2, i + posAdd[i - 1][0], '~', i - 1, 0);
}

for (int j = 1; j <= sizeB; ++j)
{
dp[0][j] = j;
posAdd[0][j] = j;
f[0][j] = _node(1, j, b[j], 0, j - 1);
f[0][j] = _node(1, 1 + posAdd[0][j - 1], b[j], 0, j - 1);
}

for (int i = 1; i <= sizeA; ++i)
Expand Down

0 comments on commit d214675

Please sign in to comment.