Problem F
The Giant
Languages
en
ja
sv
You have been captured by an evil giant. You are both in a
Write a program that, given the size of the cave, the
coordinates for the giant’s right foot (
Input
The first line of the input contains two integers
The second line contains four integers
Output
Print two integers
Scoring
Your solution will be tested on a set of test case groups. To get the points for a group, you need to pass all the test cases in the group.
Group |
Points |
Constraints |
|
|
|
|
|
|
|
|
|
|
|
No further constraints |
Explanation of sample 1
In example 1, the points
The point
The point
Sample Input 1 | Sample Output 1 |
---|---|
4 5 1 1 3 4 |
1 2 |
Sample Input 2 | Sample Output 2 |
---|---|
1000 1000 500 500 500 502 |
498 498 |
Sample Input 3 | Sample Output 3 |
---|---|
1000000000 1000000000 0 0 0 999999999 |
10 500000000 |
Footnotes
- A triangle is non-degenerate if its three vertices do not lie on the same line, https://en.wikipedia.org/wiki/Degeneracy_(mathematics)