I Hate Sigma Problems
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.
AT_abc371_e [ABC371E] I Hate Sigma Problems
题目描述
给定一个长度为 的整数序列 。定义 如下:
- 表示区间 中不同数的个数。
请计算下式的值:

输入格式
输入以如下格式从标准输入中给出。
输出格式
请输出答案。
输入输出样例 #1
输入 #1
3
1 2 2
输出 #1
8
输入输出样例 #2
输入 #2
9
5 4 2 2 3 2 4 4 1
输出 #2
111
说明/提示
限制条件
- 输入的所有数均为整数
样例解释 1
以 为例,,其中不同的数有 个,所以 。再看 ,,其中不同的数有 个,所以 。 的总和为 。
由 ChatGPT 4.1 翻译
1206
- Status
- Done
- Rule
- IOI
- Problem
- 5
- Start at
- 2025-12-6 14:00
- End at
- 2025-12-6 17:30
- Duration
- 3.5 hour(s)
- Host
- Partic.
- 34