← All problemsSign in

ConvexCoeff

Problem description. Given a convex polygon with N vertices. We have M Queries. In each Query, we are given a point P which is inside the polygon. This point P can be represented as Linear Combination of N vertices of polygon. We need to find the N coefficients in each Query. i.e P(X, Y) = A1 * (X1, Y1) + A2 * (X2, Y2) + ..... + An * (Xn, Yn). where 0 Input First Line contains an integer N Ne

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