#84. matchUp

matchUp

Background

Description

Given arrays nums1 and nums2 of the same length, for every element in nums1, consider the corresponding element in nums2 (at the same index). Return the count of the number of times that the two elements differ by 2 or less, but are not equal.

Format

Input

Output

Samples

[1 2 3] [2 3 10]
2
[1 2 3] [2 3 5]
3
[1 2 3] [2 3 3]
2

Limitation

1s, 1024KiB for each test case.