QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#241519 | #7042. So Easy | zGoofy | WA | 0ms | 3824kb | C++14 | 1.1kb | 2023-11-06 10:03:48 | 2023-11-06 10:03:49 |
Judging History
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