QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#475108#8892. Power Gridoolimry0 0ms0kbC++141004b2024-07-13 11:24:222024-07-13 11:24:23

Judging History

This is the latest submission verdict.

  • [2024-07-13 11:24:23]
  • Judged
  • Verdict: 0
  • Time: 0ms
  • Memory: 0kb
  • [2024-07-13 11:24:22]
  • Submitted

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%