E. 练52.2 数组间的比较大小

    Type: Default 1000ms 64MiB

练52.2 数组间的比较大小

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Description

There are two arrays aa and bb, each with 1010 elements. Compare them element by element (i.e., a[0]a[0] with b[0]b[0], a[1]a[1] with b[1]b[1], and so on). If the number of elements in array aa that are greater than the corresponding elements in array bb is more than the number of elements in array bb that are greater than the corresponding elements in array aa (for example, a[i]>b[i]a[i]>b[i] 6 times, while b[i]>a[i]b[i]>a[i] 3 times), then array aa is considered greater than array bb.
Write a program to determine the relationship between arrays aa and bb, and count the number of times elements in aa are greater than, equal to, or less than the corresponding elements in bb.

Input Format

Two lines, each containing 1010 integers separated by spaces, representing arrays aa and bb.

Output Format

The first line should output the number of times elements in aa are greater than, equal to, and less than the corresponding elements in bb, separated by spaces.
If array aa is greater than array bb, output "a>b" on the second line; if array aa is less than array bb, output "a<b"; if the arrays are equal, output "a=b".
Note: Do not output quotes, and ensure to output a newline at the end of each line.

Sample

1 3 5 7 9 8 6 4 2 0
5 3 8 9 -1 -3 5 6 0 4
4 1 5
a<b

20230913C班作业(1)

Not Claimed
Status
Done
Problem
6
Open Since
2025-9-13 0:00
Deadline
2025-9-21 23:59
Extension
24 hour(s)