QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#613802#7964. 转化lymWA 78ms13984kbC++20820b2024-10-05 14:46:472024-10-05 14:46:52

Judging History

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

  • [2024-10-05 14:46:52]
  • 评测
  • 测评结果:WA
  • 用时:78ms
  • 内存:13984kb
  • [2024-10-05 14:46:47]
  • 提交

answer

#include<bits/stdc++.h>
using i64 = long long;
#define int i64
void solve() {
	int n;
	std::cin >> n;
	std::vector<int> a(n + 1), b(n + 1), c(n + 1), d(n + 1);
	i64 sum = 0;
	for (int i = 1; i <= n; i ++) {
		std::cin >> a[i];
	}
	for (int i = 1; i <= n; i ++) {
		std::cin >> b[i];
	}
	for (int i = 1; i <= n; i ++) {
		std::cin >> c[i];
	}
	for (int i = 1; i <= n; i ++) {
		sum += a[i] + c[i];
	}
	i64 op = 0;
	for (int i = 1; i <= n; i ++) {
		d[i] = std::min(b[i], a[i] + c[i]);
		op += d[i];
	}
	for (int i = 1; i <= n; i ++) {
		std::cout << a[i] + c[i] + op - d[i] << ' ';
	}
	std::cout << '\n';
	std::cout << sum << '\n';
}
signed main() {
	std::ios::sync_with_stdio(false);
	std::cin.tie(nullptr);
	int t = 1;
	//std::cin >> t;
	while (t --) {
		solve();
	}
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 78ms
memory: 13984kb

input:

351493
0 37836791 46095966 46912389 21595941 0 3 86568894 3 0 0 0 0 39910208 0 2 4 86885825 1 67660833 0 24488082 52447896 0 67190942 70457491 11166998 90470470 11095822 0 0 5 47222930 2 49736354 0 0 0 77339472 0 5 3 0 25347727 0 3 2 0 48844622 0 65142757 1 73733079 80634668 46683173 0 31644647 9760...

output:

60073965108098 60073472434579 60073472434579 60073481786076 60073472434579 60073788795704 60073528186939 60073472434579 60073844417038 60073784237527 60073472434579 60073472434579 60073948724359 60073472434579 60073472434579 60073667243820 60073550392304 60073472434579 60073631606704 60073472434579 ...

result:

wrong answer 1st lines differ - expected: '60073965049724 60073472376204 ...4 60073701685447 60073472376204', found: '60073965108098 60073472434579 ... 60073701743821 60073472434579 '