Skip to content

Commit

Permalink
Stickogon
Browse files Browse the repository at this point in the history
  • Loading branch information
seikhchilli committed May 3, 2024
1 parent 98efb7f commit edb4982
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions 1957A.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#include<bits/stdc++.h>
using namespace std;


#define ll long long
#define endl "\n"
#define debug(n) cout<<(n)<<endl;
#define pb push_back
const ll INF = 2e18 + 99;

int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);

int t;
cin>>t;

while(t--){
ll n;
cin>>n;

unordered_map<int, int> mp;
ll x;
for(ll i = 0; i < n; i++){
cin>>x;
mp[x]++;
}

unordered_map<int, int>::iterator it = mp.begin();
ll count = 0;
while (it != mp.end()) {
count += it->second / 3;
++it;
}
cout<<count<<endl;
}

}

0 comments on commit edb4982

Please sign in to comment.