P7375 [COCI 2018/2019 #5] Jarvis
Description
Ivan has $N$ drones. Each drone has a factory attribute value and a required attribute value for deployment. He can choose an integer $X$ ($X$ is not necessarily positive) and add $X$ to the factory attribute value of every drone.
Find the maximum number of drones that can be deployed (that is, whose attribute value becomes equal to the required attribute value for deployment).
Input Format
The first line contains an integer $N$, the number of drones.
The second line contains $N$ integers $A_i$, the factory attribute values of the drones.
The third line contains $N$ integers $B_i$, the required attribute values for deployment of the drones.
Output Format
Output the maximum number of drones that can be deployed.
Explanation/Hint
#### Explanation for Sample 3
If we choose $X=3$, the attribute values become $1+3=4$ and $2+3=5$, so only the second drone can be deployed. If $X=4$, the attribute values become $5$ and $6$, so only the first drone can be deployed. It can be proven that there is no integer $X$ that allows both drones to be deployed.
#### Constraints
For $40\%$ of the testdata, $-10 \le A_i,B_i \le 10$.
For $100\%$ of the testdata, $1 \le N \le 10^5$, $-10^6 \le A_i,B_i \le 10^6$.
#### Notes
**The score of this problem follows the original COCI setting, with a full score of $70$.**
**Translated from [COCI2018-2019](https://hsin.hr/coci/archive/2018_2019/) [CONTEST #5](https://hsin.hr/coci/archive/2018_2019/contest5_tasks.pdf) _T2 Jarvis_.**
Translated by ChatGPT 5