Count Number of Distinct Integers After Reverse Operations

Time limit: 1 s
Memory limit: 256 MB

Statement

Input format

Output format

Notes

Examples
Example 1
Input Data
Output Data
5 1 13 10 12 31
6
Example 2
Input Data
Output Data
3 2 2 2
1
efrog logo efrog.team@gmail.com © 2024 efrog