本地不对提交AC,这是怎么了?
查看原帖
本地不对提交AC,这是怎么了?
640552
spacebar楼主2022/5/19 10:13
#include <bits/stdc++.h>
using namespace std;
int main(){
	int peo,timu,allday;
	cin>>peo>>timu>>allday;
	bool have[allday][timu]{0};
	int ans[allday]{0};
	int a;
	for(int u=0;u<peo;u++){
		for(int o=0;o<timu;o++){
			cin>>a;
			a--;
			if(have[o][a]==0){
				have[o][a]=1;
				ans[a]++;
			}	
		}
	}
	cout<<ans[0]; 
	for(int u=1;u<allday;u++){
		cout<<" "<<ans[u];
	}
	return 0;
} 

第二样例输出1 1 2 1 3 1 1

2022/5/19 10:13
加载中...