report VI VI EN
Register | Login
  • HOME
  • PROBLEMSET
  • ROADMAP
  • COMPETITION
  • TOPIC
  • RANKING
  • GUIDE
  • MASHUP
  • ABOUT
  • CONTACT
  • Problem
  • Submit
  • Results
Unique - MarisaOJ: Marisa Online Judge

Unique

Time limit: 1000 ms
Memory limit: 256 MB
You are given an **non-decreasing** integer array $A$ of length $n$. Remove all duplicate elements in $A$ and print it in ascending order. ### Input - The first line contains an integers $n$. - The second line contains $n$ integers $A_i$. ### Output - $A$ in ascending order after removing duplicate elements. ### Constraints - $1 \le n \le 10^5$. - $|A_i| \le 10^9$. ### Example Input: ``` 5 -5 -3 4 4 9 ``` Output: ``` -5 -3 4 9 ```
Array
Even elements
Smallest value
Average
Array reversal
Negative and positive
Consecutive differences
Largest value
Positive and negative
Dominant element
Second largest
Maximum product
Array rotation
Palindrome array
Circle
Insert
Positive subarray
Sorting
Similar Arrays
Unique
Unique 2
Frequent value
Most Frequent Value
Bitonic sequence
Swap
Topic
Basic
Rating 800
Solution (0) Solution