Skip to content

Commit

Permalink
🐛 bug: if(lens < lenans) swap(ans, s);
Browse files Browse the repository at this point in the history
  • Loading branch information
liuchuo committed May 14, 2019
1 parent 0ea0af2 commit 72fb6ab
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions AdvancedLevel_C++/1077. Kuchiguse (20).cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ int main() {
continue;
} else {
int lenans = ans.length();
if(lens < lenans) swap(ans, s);
int minlen = min(lens, lenans);
for(int j = 0; j < minlen; j++) {
if(ans[j] != s[j]) {
Expand Down

0 comments on commit 72fb6ab

Please sign in to comment.