QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#475108 | #8892. Power Grid | oolimry | 0 | 0ms | 0kb | C++14 | 1004b | 2024-07-13 11:24:22 | 2024-07-13 11:24:23 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define sz(x) (int) (x).size()
#define all(x) (x).begin(), (x).end()
#define show(x) cerr << #x << " is " << x << endl;
#define show2(x,y) cerr << #x << " is " << x << " " << #y << " is " << y << endl;
#define show3(x,y,z) cerr << #x << " is " << x << " " << #y << " is " << y << " " << #z << " is " << z << endl;
#define showlist(x) cerr << #x << " is "; for(auto p : x) cerr << p << " "; cerr << endl;
#define int long long
typedef pair<int,int> ii;
int C[1005][1005];
int ans[1005][1005];
signed main(){
int rows, cols; cin >> rows >> cols;
for(int r = 0;r < rows;r++){
for(int c = 0;c < cols;c++){
cin >> C[r][c];
}
}
assert(rows == 1);
int total = 0;
for(int c = 0;c < cols;c++) total += C[0][c];
total /= (cols-1);
for(int c = 0;c < cols;c++) ans[0][c] = total - C[0][c];
for(int r = 0;r < rows;r++){
for(int c = 0;c < cols;c++){
cout << ans[r][c] << " ";
}
cout << '\n';
}
}
详细
Subtask #1:
score: 0
Runtime Error
Test #1:
score: 0
Runtime Error
input:
1 1 0
output:
result:
Subtask #2:
score: 0
Skipped
Dependency #1:
0%
Subtask #3:
score: 0
Runtime Error
Test #23:
score: 0
Runtime Error
input:
1 1 0
output:
result:
Subtask #4:
score: 0
Runtime Error
Test #30:
score: 0
Runtime Error
input:
2 2 0 0 0 0
output:
result:
Subtask #5:
score: 0
Runtime Error
Test #46:
score: 0
Runtime Error
input:
2 4 253 431 207 483 243 65 289 13
output:
result:
Subtask #6:
score: 0
Runtime Error
Test #58:
score: 0
Runtime Error
input:
1000 1000 1 0 0 1 0 1 0 1 0 0 1 1 0 0 1 1 1 1 1 1 1 1 0 0 0 1 0 1 1 0 1 1 0 1 1 1 0 0 1 1 0 0 0 1 1 0 1 1 0 1 1 1 0 0 0 1 0 0 0 1 0 1 1 0 0 0 1 0 0 0 1 1 0 1 1 0 0 0 0 1 0 1 1 0 0 0 0 0 1 0 1 1 0 0 1 1 0 1 0 1 1 1 1 0 1 1 0 0 1 0 1 0 1 1 0 1 0 0 0 0 0 1 1 1 0 1 0 1 0 0 1 1 1 0 1 1 0 0 0 0 1 1 0 1 1 ...
output:
result:
Subtask #7:
score: 0
Runtime Error
Test #68:
score: 0
Runtime Error
input:
2 2 5 52 52 5
output:
result:
Subtask #8:
score: 0
Skipped
Dependency #2:
0%
Subtask #9:
score: 0
Skipped
Dependency #1:
0%