Write a function
int common_elements(const vector<int>& X, const vector<int>& Y);
that given two vectors @X@ and @Y@ in increasing order, returns the number of common elements in the two vectors, that is, the number of integer numbers such that for any and .
The two vectors are in strictly increasing order.
@common_elements@
@common_elements@
@common_elements@
Author: Unknown
Translator: Carlos Molina
Generation: 2026-01-25T10:37:53.258Z
© Jutge.org, 2006–2026.
https://jutge.org