Horje
Chef and Races codechef solution in c++ Code Example
Chef and Races codechef solution in c++
#include<iostream>
#include<algorithm>
#include<vector>
#define ll long long
using namespace std;

void solve()
{
	vector<ll> v(4);
	for (int i = 0; i < 4; i++)
	{
		cin >> v[i];
	}
	sort(v.begin(), v.end());
	v.erase(unique(v.begin(), v.end()), v.end());
	ll n = v.size();
	if (n == 4)
		cout << n / 2 << "\n";
	else 
		cout << (n - 1) / 2 << "\n";
}

int main()
{
	int t;
	cin >> t;
	while (t--)
	{
		solve();
	}
	return 0;
}




Cpp

Related
how to set a variable to infinity in c++ Code Example how to set a variable to infinity in c++ Code Example
Stream Overloading Code Example Stream Overloading Code Example
rotation 2d d'un point Code Example rotation 2d d'un point Code Example
esp Code Example esp Code Example
query for rmq using sqrt decomposition Code Example query for rmq using sqrt decomposition Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7