1,2,3点没了,大佬帮帮忙
查看原帖
1,2,3点没了,大佬帮帮忙
916027
qew12312楼主2023/1/4 12:09
#include<iostream>
#include<cmath>
#include<cstring>
using namespace std;
int main()
{int t,i,e,r,er;
	cin>>i;
	double a[i][7],b[7];
	int c[7]={0,0,0,0,0,0,0};
	for(t=0;t<7;t++) cin>>b[t];
	for(t=0;t<i;t++)
	{
		for(r=0;r<7;r++)	cin>>a[t][r];	
	}
		for(t=0;t<i;t++)
	{
	if(er>0) c[7-er]++;
	er=0;
		for(r=0;r<7;r++){
			for(e=0;e<7;e++) if(a[t][e]==b[r]) er++;			
			}}
	for(t=0;t<6;t++) cout<<c[t]<<" ";
	cout<<c[6];
return 0;
}
2023/1/4 12:09
加载中...