mercredi 29 avril 2020

Find the no of pairs with gcd 1 efficiently

Given 2 arrays of length n, a and b, I want to find the number of pairs such that gcd(a[i], b[j]) == 1 in less than O(n^2).

Aucun commentaire:

Enregistrer un commentaire