Skip to content

Commit

Permalink
Fix solution
Browse files Browse the repository at this point in the history
  • Loading branch information
metopa committed May 2, 2018
1 parent 144247d commit 29688cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion epi_judge_cpp_solutions/int_as_array_multiply.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ using std::abs;
using std::vector;

vector<int> Multiply(vector<int> num1, vector<int> num2) {
const int sign = num1.front() < 0 ^ num2.front() < 0 ? -1 : 1;
const int sign = (num1.front() < 0) ^ (num2.front() < 0) ? -1 : 1;
num1.front() = abs(num1.front()), num2.front() = abs(num2.front());

vector<int> result(size(num1) + size(num2), 0);
Expand Down

0 comments on commit 29688cf

Please sign in to comment.