TRIGALGE - Easy Calculation
Find x such that Ax+Bsin(x)=C.
Input
The first line denotes T (number of test cases). 3T integers follow denoting A,B and C for every test case. (A >= B > 0). All Integers are less than 100000.
Output
T real numbers rounded to 6 digits one in each line.
Example
Input: 1 1 1 20 Output: 19.441787
hide comments
Muhammad Yunus Bahari:
2012-03-21 01:22:25
AC :) Last edit: 2012-03-21 02:54:27 |
|
numerix:
2012-02-28 20:04:47
Last edit: 2012-04-05 09:42:42 |
|
Devil D:
2012-02-28 12:51:08
Last edit: 2012-03-29 09:24:06 |
|
Devil D:
2012-03-31 10:19:39
I took the initial guess as C/A.
|
|
hemezh:
2012-02-24 23:08:08
What should be the initial guess?? I am using c/(a+b) and getting TLE. |
|
Peyman:
2012-02-24 02:44:22
Turns out you can do it much simpler than Newton; even in Python ;-) |
|
jitendra kumar:
2012-02-21 06:06:07
simple bisection gets AC just need to set range properly |
|
Ikhaduri:
2012-02-20 18:53:28
Bisection without Newton's will TLE? |
|
mehmetin:
2012-02-19 18:06:39
@surya
|
|
Surya kiran:
2012-02-19 18:02:35
guess means ??
|
Added by: | Saransh Bansal |
Date: | 2012-02-17 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 |