Vectors
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
Given two non-zero vectors, your task is to compute the following:
The lengths of the first and second vectors (two separate numbers).
The vector resulting from the addition of the two given vectors.
The scalar (dot) product and the vector (cross) product of the given vectors.
The area of the triangle formed by these vectors.
Input
The input consists of two lines, each containing four integers. These integers represent the coordinates of the start and end points of the first vector, followed by those of the second vector. Each integer does not exceed 10000 in absolute value.
Output
For each task item, output the result on a new line, ensuring a precision of at least 10^{-6}.
Examples
Input #1
Answer #1
Submissions 1K
Acceptance rate 32%