1b
This commit is contained in:
parent
01b1781daf
commit
00643faf49
@ -14,11 +14,15 @@ int main()
|
||||
bs.insert(b);
|
||||
}
|
||||
|
||||
int total{};
|
||||
int distance{};
|
||||
int similarity{};
|
||||
|
||||
for (auto ia = as.cbegin(), ib = bs.cbegin(); ia != as.end(); ++ia, ++ib)
|
||||
{
|
||||
total += std::abs(*ia - *ib);
|
||||
distance += std::abs(*ia - *ib);
|
||||
similarity += *ia * bs.count(*ia);
|
||||
}
|
||||
std::cout << total << "\n";
|
||||
std::cout << "Total difference: " << distance << "\n";
|
||||
std::cout << "Total distance: " << similarity << "\n";
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user