Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
335 B
2
Indexable
Never
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
	int n;
	cin >> n;
	int x;
	cin >> x;
	int t;
	int a=0, b=0, c=0;
	for (int i = 0; i < n; i++)
	{
		cin >> t;
		if (t % 2 == x % 2) {
			if (t < x) a++;
			if (t == x) b++;
			if (t > x) c++;
		}
	}
	cout << a << " " << b << " "<<c;
	
}