Help. Counting the fraction more repeats in two vectors

Greetings, I have a great doubt wish to have the most common fraction, knowing which are the numerators and denominators on a table in another.
#include <vector>
vector <long long int> nume;
vector <long long int> deno;

DEN 1 1 1 2 1
NUM 1 2 2 5 2

Would result 3 since 1/2 can be constructed three times. You can not use decimal divide and work must be done on both vectors efficiently.
Last edited on
Registered users can post here. Sign in or register to post.