Geometry Class
CodeChefOpen on judge ↗
It's time for the coordinate geometry class. We are given a 2-D grid on which the line x=y and y=0 are drawn. For simplicity assume only the first quadrant is present. You are given q queries to answer. For each query, a line x=a is drawn i.e. a right angled triangle is formed for each query of varying size. Consider all the lattice points on the boundary and inside the triangle formed. (A lattic
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