Ghayal Sub-Arrays
CodeChefOpen on judge ↗
Yes , you read that right! Ghayal Subarrays do exist in Gudde world where characters like Gande and Ghatak also exists. Formally, A Ghayal Subarray of an array is defined as a subarray ( A[L,R] where 1 ≤ L ≤ R ≤ N ) having the sum of all A[i] such that A[i] is a prime number and Llesser than or equal to a magical number X. Gudde's MD(Mechanical Disaster) teacher has given Gudde the task of count
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