QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#469249#4786. BalancePlentyOfPenaltyWA 0ms3880kbC++17601b2024-07-09 16:43:242024-07-09 16:43:24

Judging History

你现在查看的是最新测评结果

  • [2024-07-09 16:43:24]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3880kb
  • [2024-07-09 16:43:24]
  • 提交

answer

#include<bits/stdc++.h>
typedef long long ll;
void umax(ll& a,ll t)
{
    if(t>a)a=t;
}
const int MAXN = 1011;
ll a[MAXN][MAXN];
int main()
{
    int n;
    scanf("%d",&n);
    for(int i=1;i<=n;++i)
        for(int j=1;j<=n;++j)
            scanf("%lld",&a[i][j]);
    for(int i=2;i<=n;++i)
    {
        ll delta=a[i][1]-a[i-1][1];
        for(int j=2;j<=n;++j)umax(delta,a[i][j]-a[i-1][j]);
        for(int j=1;j<=n;++j)a[i][j]=a[i-1][j]+delta;
    }
    for(int i=1;i<=n;++i)
        for(int j=1;j<=n;++j)
            printf("%lld%c",a[i][j],j==n?'\n':' ');
    return 0;
}

詳細信息

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3880kb

input:

4
1 1 1 1
1 1 1 1
1 1 1 0
1 1 1 1

output:

1 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1

result:

wrong output format Unexpected end of file - int32 expected