塑料姐妹花
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.
题面背景
如果 鼠和 鼠互相喜欢, 那我们称为土拨鼠闺蜜。
题目描述
有 只土拨鼠, 编号从 到 , 第 只土拨鼠喜欢 , 注意, 有些土拨鼠很自恋, 喜欢自己, 像这种土拨鼠是没有闺蜜的。
现在我们想知道一共有多少对土拨鼠闺蜜。
输入格式
第一行输入一个整数
第二行输入 个整数
输出格式
输出 个整数,表示所求的答案
样例 #1
样例输入 #1
4
2 1 4 3
样例输出 #1
2
样例 #2
样例输入 #2
3
1 2 3
样例输出 #2
0
数据范围
2025北辰贺岁杯入门赛-复现赛
- Status
- Done
- Rule
- Ledo
- Problem
- 6
- Start at
- 2025-1-18 9:00
- End at
- 2025-2-4 1:00
- Duration
- 400 hour(s)
- Host
- Partic.
- 53