Find Pair
Practice
2.5 (11 votes)
Basic programming
Open
Approved
Easy
Hash function
Mathamatics
Problem
69% Success 6417 Attempts 20 Points 5s Time Limit 256MB Memory 1024 KB Max Code
Given an array A having N elements. Find total number of pairs (i,j) such that j < i and Aj = Ai.
Input:
First line of input contains N, size of array A. Next line contains N space separated elements of array A.
Output:
Print the required answer.
Constraints:
1 ≤ N ≤ 105
0 ≤ Ai ≤ 105
Submissions
Please login to view your submissions
Similar Problems
Points:20
Tags:
Easy
Points:20
2 votes
Tags:
MathematicsEasyMathematicsMathamatics
Points:20
10 votes
Tags:
ImplementationMath BasicBasics of ImplementationC++Basic MathMathGame Theory
Editorial