#include <iostream>
#include <vector>
#include <unordered_map>
using namespace std;
int main() {
vector<int> nums = {1, 2, 3, 2, 4, 1, 2};
unordered_map<int, int> freq;
for (int num : nums) {
freq[num]++;
}
cout << "Repeated elements:\n";
for (auto &entry : freq) {
if (entry.second > 1) {
cout << entry.first << " appears " << entry.second << " times\n";
}
}
return 0;
}