Miss Spaghetti and her weird queries
CodeChefOpen on judge ↗
Miss Spaghetti is known for her beauty and her weird interests. One of her interets is to find the number of primes in range [l,r] in a given array A. She will also ask you to update the value present at the i position of the array. Formally speaking there will be two types of queries on a given array A. - The first query is of type 1 L R. You need to print the number of primes in this range(
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