Could anyone tell me some special inputs for this problem ?
I don't know , that my algorithm is correct, maybe (and probably that is) is wrong
If someone want, he/she can send me Windows executable to my own test (reading from stdin and writing to stdout)
I'll be greatful for help
Best regards and Happy Easter )
DM
If you really want to get Accepted, try to think about possible, and after that - about impossible ... and you'll get, what you want ....
Born from ashes - restarting counter of problems (800+ solved problems)
I do not know the algorithm that you are using, but i can tell you that you must use vector component.
At first i was trying it with trigonometry(cosine rule), but later i realized that this is an erroneous approach. Later i considered vector component and got AC.
alfa[i+1] = alfa[i] + (T % b[i+1].period)*2*PI/b[i+1].period
x' = x + b[i].r*cos(alfa[i+1]);
y' = y + b[i].r*sin(alfa[i+1]);
where T is given time, b[x].period is time, in which body[x] make one full movevment around of body b[x-1] ....
Is this wrong ?
DM
If you really want to get Accepted, try to think about possible, and after that - about impossible ... and you'll get, what you want ....
Born from ashes - restarting counter of problems (800+ solved problems)
Can anyone tell me why my code is getting wa? I calculated the theta and then applied pythagoras formula to calculate the distance. Thanks in advance.
[cpp]
#include <stdio.h>
#include <math.h>