← All problemsSign in

Interesting Test

This time teacher gave Hardik and vivek an interesting problem. - Given $N$ arrays of each of size $M$. They have to find the number of triplets ($i$,$j$,$k$) where 1<=$i$<$j$<$k$<=$N$ such that $i$th, $j$th and $k$th selected array have atleast 1 prime number in common. Help them to solve this problem. The answer can be large So,find the answer with $mod$ 1000000007. ###Input: - First 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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start