c++全wa,求调
查看原帖
c++全wa,求调
1490243
D5wudi楼主2024/12/6 17:44
#include<bits/stdc++.h>
using namespace std;
int a[10],b[10];
int tot[8];
int main(){
	int n,tot1;
	cin>>n;
	for(int j=0;j<7;j++)cin>>b[j];
	for(int i=1;i<n;i++){
		for(int j=0;j<7;j++){
			cin>>a[j];
			if(a[j]==b[j]){
				tot1++;
			}
		}
		for(int l=0;l<=7;l++)
			if(tot1==l)
			tot[l]++;
		tot1=0;
	}
	for(int i=7;i>=1;i--){
		cout<<tot[i]<<" ";
	}
}
2024/12/6 17:44
加载中...