#include<bits/stdc++.h> using namespace std; int n,a[200][200],cnt[12934],cnt1; int main(){ cin>>n; for(int i=1;i<=n;i++){ for(int j=1;j<=3;j++){ cin>>a[i][j]; } } for(int i=1;i<=n;i++){ for(int j=1;j<=3;j++){ cnt[i]=cnt[i]+a[i][j]; } } /* 90 90 90 85 85 100

*/
for(int i=1;i<=n;i++){
	for(int o=i+1;o<=n;o++){
		int x = 0;
        for(int j=1;j<=3;j++){
            if(a[i][j]-a[o][j]<=5){

// cnt1++; x++; } } if (x == 3 && cnt[i]-cnt[o]<=10) cnt1++; } } cout<<cnt1; return 0; }

0 comments

No comments so far...