ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1875. Angry Birds

accepted 0.015 s 112 kb
Posted by Sunnat 30 Apr 2013 17:21
parabola function helps for you !!!
k = x1 * x2 * (x2 - x1);
a = y2 * x1 -  y1 * x2;               // a = (y2 * x1 -  y1 * x2) / k;
b = y1 * x2 * (x2 - x1) - a * x1;     // b = (y1 * x2 * (x2 - x1) - a * x1) / k

if(y[i] * k == a * x[i] * x[i] + b * x[i])   delete index i ...