"Noioj" p7914 (..)

Source: Internet
Author: User

08: Output number is not repeated
    • View
    • Submit
    • Statistics
    • Questions
Total time limit:
1000ms
Memory Limit:
65536kB
Describe

Enter n number, from small to general they output, repeat the number output only once. Ensure that there are no more than 500 different numbers.

Input
The first line is an integer n. 1 <= n <= 100000.
Then n lines, one integer per line. The integer size is within the range of int.
Output
line, from small to large output these numbers, the adjacent two numbers separated by a single space.
Sample input
52 4 4) 5 1
Sample output
1 2 4 5
1#include <iostream>2#include <cstdio>3#include <algorithm>4 using namespacestd;5 inta[100010],n,i;6 intMain ()7 {8scanf"%d",&n);9      for(i=1; i<=n;i++)Tenscanf"%d",&a[i]); OneSort (A +0, a+n+1); Aprintf"%d", a[1]); -      for(i=2; i<=n;i++) -         if(a[i]!=a[i-1]) theprintf"%d", A[i]); -     return 0; -}

"Noioj" p7914 (..)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.