completed p1p1
This commit is contained in:
parent
885e836f74
commit
1f7d96ad3f
2 changed files with 1 additions and 1 deletions
BIN
1/puzzle1
BIN
1/puzzle1
Binary file not shown.
|
|
@ -28,7 +28,7 @@ int main(){
|
|||
listTwo.sort();
|
||||
|
||||
for (int x=0; !listOne.empty();x++){
|
||||
totalDistance += listOne.front() + listTwo.front();
|
||||
totalDistance += abs(listOne.front() - listTwo.front());
|
||||
listOne.pop_front();
|
||||
listTwo.pop_front();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue