B3947
  • 板块学术版
  • 楼主swsy2345b
  • 当前回复6
  • 已保存回复6
  • 发布时间2025/1/23 15:25
  • 上次更新2025/1/23 17:50:22
查看原帖
B3947
1412382
swsy2345b楼主2025/1/23 15:25

题目

#include<bits/stdc++.h>
using namespace std;
#define ll long long
ll a;
int main()
{
	ll n,m,k,ans=0,maxn=-1e20;
	cin >> n >> m >> k;
	for(ll i=1;i<=n;i++)
	{	
		for(ll j=1;j<=m;j++)
		{
			cin >> a;
			maxn=max(maxn,a-j*k);
		}
		ans+=maxn;		
	}
	cout << ans;
	return 0;
}

改了8遍,样例过了,0分。在这里搜索swsy2345b就可以看到了。

求求了!(之所以在此发布,是因为想让更多人帮忙)

2025/1/23 15:25
加载中...