发红水了(c++B3964)
查看原帖
发红水了(c++B3964)
1219475
yangbohao楼主2025/2/8 10:49

到底哪里错了?

#include<bits/stdc++.h>
using namespace std;
long long n,m,k,xy[1000][1000];
long x,y,h[1000],c;
int main(){
	cin>>n>>m>>k;
	for(int i=1;i<=k;i++){
		cin>>x>>y>>h[i]>>c;
		if(xy[x][y]==0)xy[x][y]==c;
		if(h[i]<h[i-1])xy[x][y]==c;
	}for(int i=1;i<=n;i++){
		for(int j=1;j<=m;j++)cout<<xy[i][j]<<" ";
		cout<<endl;
	}
	return 0;
} 
2025/2/8 10:49
加载中...