A. 非重复数

    Type: Default 1000ms 256MiB

非重复数

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目背景

翻译自 CSES-1621 题。

题目描述

给定一个包含 nn 个整数的列表,你的任务是计算列表中不同值的数量。

输入格式

第一行输入一个整数 nn,表示列表中数字的个数。

第二行输入 nn 个整数 x1,x2,...,xnx_1, x_2, ..., x_n,表示列表中的各个数字。

输出格式

输出一个整数,表示列表中不同值的数量。

样例

5
2 3 2 2 3
2

说明/提示

1n2×1051\le n \le 2 \times 10^5

1xi1091 \leq x_i \leq 10^9

CSES练习二 排序贪心STL

Not Claimed
Status
Done
Problem
35
Open Since
2025-5-1 0:00
Deadline
2025-5-31 23:59
Extension
24 hour(s)