Tumpa and a Graph
CodeChefOpen on judge ↗
Tumpaa has moved on to graph theory now,she has an array of numbers.An edge can be constructed between any two elements of the array if the gcd(a[i],a[j])>1 Where $i!=j$.Help Tumpaa find if its possible a complete graph can be constructed using the numbers in the array. . ###Input: - First line will contain $n$, number of elements in the array. Then the numbers in the array follow. - $n$ lin
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start