Skip to content

Instantly share code, notes, and snippets.

@NehaJeevan
Created September 26, 2016 13:05
Show Gist options
  • Save NehaJeevan/0f519381b3b6a64429331a0c334c8452 to your computer and use it in GitHub Desktop.
Save NehaJeevan/0f519381b3b6a64429331a0c334c8452 to your computer and use it in GitHub Desktop.
591 A Codeforces Round #327 (Div. 2), problem: (A) Wizards' Duel
#include <iostream>
using namespace std;
typedef long long ll;
int main() {
// your code goes here
ll l,p,q;
cin>>l>>p>>q;
/* If H travels x & his speed is p, V travels l-x with speed q.
For collision time taken to travel x & l-x respectively is equal
Use equations of motion & calculate x.*/
cout<<(float)(p*l)/(p+q);
return 0;
}
@techsamy
Copy link

Hey, are u a IOS Developer ??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment