Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
329 B
0
Indexable
Never
#include <bits/stdc++.h>
using namespace std;

int main()
{

	int n, t;
	cin >> n >> t;

	map<long long, long long> cnt;
	for(int i = 1; i <= t; i++)
	{
		long long a, b;
		cin >> a >> b;

		cnt[a]++;
		cnt[b]++;
	}

	long long sum = 0;
	for(int i = 1; i <= n; i++)
	{
		sum += cnt[i];
	}
	cout << sum;
}
Leave a Comment