CREP- Editorial

cakewalk
deme2018

#1

PROBLEM LINK:

Contest

Author: avi224

Editorialist: avi224

DIFFICULTY:

CAKEWALK.

PREREQUISITES:

STL

PROBLEM:

Print the sum of all numbers in an array occurring exactly K times. If there is no such number, print -1.

EXPLANATION:

This can be implemented by using a map or unordered map in C++. Just take the sum of numbers whose frequency is K, considering each number only once.

Solution


#2

Where is the Author’s solution code ?