Answered step by step
Verified Expert Solution
Question
1 Approved Answer
To enhance data security and prevent data breaches, Uber does not store the distance and time of a ride directly. Instead, we store derived values
To enhance data security and prevent data breaches, Uber does not store the distance and time of a ride directly. Instead, we store derived values as unitless quantities: uSpeed Value representing avg speed Floor in case of nonint
uAlpha A value representing time plus distance
uBeta A value representing time multiplied by distance
uDelta A value representing time minus distance
Due to a technical issue, these values got mixed up and the system forgot which value corresponds to which statistic. The values do not always appear in a specific order.
Your task is to return the distance and time corresponding
to the four given values. Assume the absolute value of
distance is always greater than time.
For example, if Time is and Distance is
uSpeed Floor uAlpha uBeta uDelta
Input record can be
execution time limit seconds cpp
memory limit GB
input integer t
The first line contains an integer T the number of test cases.
T
input array.array.integer testCases
Each test case consists of four integers ABCD representing the mixedup values of uSpeed, uAlpha, uBeta and uDelta.
ABCD
output array.array.integer
For each test case, return two numbers, Distance followed by Time
If no such integers exist, return
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started