QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#241519#7042. So EasyzGoofyWA 0ms3824kbC++141.1kb2023-11-06 10:03:482023-11-06 10:03:49

Judging History

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

  • [2023-11-06 10:03:49]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3824kb
  • [2023-11-06 10:03:48]
  • 提交

answer

#include <bits/stdc++.h>
#define int long long
#define lowbit(x) x & (-x)
using namespace std;
const int mod = 1000000007;

int a[1001][1001];
void solve() {
    int n; cin >> n;
    vector<int>mr(n + 1, 1000001),mc(n + 1, 1000001);
    for(int i = 1; i <= n; i++) {
        for(int j = 1; j <= n; j++) {
            cin >> a[i][j];
            if(a[i][j] >= 0) mr[i] = min(mr[i],a[i][j]);
        }
    }
    for(int i = 1; i <= n; i++) {
        for(int j = 1; j <= n; j++) {
            a[i][j] -= mr[i];
        }
    }
    for(int j = 1; j <= n; j++) {
        for(int i = 1; i <= n; i++) {
            if(a[i][j] >= 0) mc[j] = min(mc[j], a[i][j]);
        }
    }
    for(int j = 1; j <= n; j++) {
        for(int i = 1; i <= n; i++) {
            a[i][j] -= mc[j];
        }
    }
    for(int i = 1; i <= n; i++) {
        for(int j = 1; j <= n; j++) {
            if(a[i][j] < 0) cout << -a[i][j] - 1 << 'n';
        } 
    }
}


signed main() {
	ios::sync_with_stdio(false);
	int tt = 1;
	// cin >> tt;
	while (tt--) {
		solve();
	}
}




Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

3
1 2 1
0 -1 0
0 1 0

output:

1n

result:

wrong output format Expected integer, but "1n" found