completed p1p1
This commit is contained in:
@@ -28,7 +28,7 @@ int main(){
|
|||||||
listTwo.sort();
|
listTwo.sort();
|
||||||
|
|
||||||
for (int x=0; !listOne.empty();x++){
|
for (int x=0; !listOne.empty();x++){
|
||||||
totalDistance += listOne.front() + listTwo.front();
|
totalDistance += abs(listOne.front() - listTwo.front());
|
||||||
listOne.pop_front();
|
listOne.pop_front();
|
||||||
listTwo.pop_front();
|
listTwo.pop_front();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user