oj mrJudge
Toggle navigation
  • Login
    • Forget Password
      Login
User Image

Hello, Stranger

Guest
  • Analysis Mode
  • Problems
    • All Problems
    • Latest Problems
  • Join Us Now
  • Registration
  • Contact Us
  • Infomation
  • About
    • Terms of Use
    • Technical Specifications
    • Credits

uniquenumbers_ex Batch , stdin/stdout

Registered Users Only

Please login to utilize this feature.

Do note that this website only supports submissions in C++.

uniquenumbers_ex.html

Problem Description

Rar the Cat likes collating numbers. Given a list of N integers, tell Rar the Cat how many unique integers there are in that list.

Input

The first line of input will contain one integer, N. The second line of input will contain N integers, containing the list of integers that Rar the Cat wants to collate.

Output

Your output should contain one integer, the number of unique integers there are in Rar the Cat's list.

Limits

Subtask 1 (33%): 1 ≤ N ≤ 1000000. The list of integers will fit into a 32-bit signed int.
Subtask 2 (67%): 1 ≤ N ≤ 1000000. The list of integers will NOT fit into a 64-bit unsigned int, but will be not more than 50 digits long.

Sample Input 1

10
1 2 3 4 5 6 6 8 9 10

Sample Output 1

9

Sample Input 2

10
-1 -2 -3 -4 0 0 -5 -6 -7 -1

Sample Output 2

8

Tags

String Processing, Bignum, Data Structure

Subtasks and Limits

Subtask Score #TC Time Memory Scoring
133105s256MBMinimum
267105s256MBMinimum
3025s256MBMinimum

Judge Compile Command

g++-8 ans.cpp -o uniquenumbers_ex -Wall -Wshadow -static -O2 -lm -m64 -s -w -std=gnu++17 -fmax-errors=512

Accepted Submissions

subIDUserTimeMax Time

Past Submissions

subIDUserTimeScore
mrJudge 09.05.20
Copyright © 2020 mrJudge. All rights reserved.