只有15分怎么办???
查看原帖
只有15分怎么办???
1049296
1000YMH2楼主2024/10/17 20:34
#include<bits/stdc++.h>
using namespace std;
int main(){
//	freopen("dist.in","r",stdin);
//	freopen("dist.out","w",stdout);
	int n,m,p[102][102],a,b,c,op,ans=0;
	cin>>n>>m;
	while(m--){
		cin>>op>>a>>b>>c;
		if(op==1){
			p[a][b]+=c;
		}
		if(op==2){
			p[a][b]-=c;
		}
		for(int i=1;i<=n;i++){
			for(int j=1;j<=n;j++){
				ans=max(ans,p[i][j]);
			}
		}
		cout<<ans<<endl;
	}
	return 0;
}

求求了

2024/10/17 20:34
加载中...