求助WAWAWAWAWAWAWA
查看原帖
求助WAWAWAWAWAWAWA
1238295
jzphhc楼主2024/11/3 17:04
#include<bits/stdc++.h>
using namespace std;
int main(){
    int n,sum=0,count=0,t=0;
    cin>>n;
    int a[1001][3];
    int b[1001];
    for(int i=0;i<n;i++){
        for(int j=0;j<3;j++){
            cin>>a[i][j];
            sum+=a[i][j];
        }
        b[i]=sum;
        sum=0;
    }
    for(int i=0;i<n-1;i++){
        for(int j=0;j<3;j++){
            int c=a[i][j]-a[i+a][j];
            int d=b[i]-b[i+1];
            if(abs(c)<=5&&abs(b)<=10)
            count++;
        }
        if(count==3) t++;
    }
    cout<<t;
    return 0;
}
2024/11/3 17:04
加载中...