QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#643723 | #7964. 转化 | hos_lyric# | WA | 98ms | 14112kb | C++14 | 2.0kb | 2024-10-15 23:24:29 | 2024-10-15 23:24:30 |
Judging History
answer
#include <cassert>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <functional>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
using namespace std;
using Int = long long;
template <class T1, class T2> ostream &operator<<(ostream &os, const pair<T1, T2> &a) { return os << "(" << a.first << ", " << a.second << ")"; };
template <class T> ostream &operator<<(ostream &os, const vector<T> &as) { const int sz = as.size(); os << "["; for (int i = 0; i < sz; ++i) { if (i >= 256) { os << ", ..."; break; } if (i > 0) { os << ", "; } os << as[i]; } return os << "]"; }
template <class T> void pv(T a, T b) { for (T i = a; i != b; ++i) cerr << *i << " "; cerr << endl; }
template <class T> bool chmin(T &t, const T &f) { if (t > f) { t = f; return true; } return false; }
template <class T> bool chmax(T &t, const T &f) { if (t < f) { t = f; return true; } return false; }
#define COLOR(s) ("\x1b[" s "m")
int N;
vector<Int> A, B, C;
int main() {
for (; ~scanf("%d", &N); ) {
A.resize(N); for (int i = 0; i < N; ++i) scanf("%lld", &A[i]);
B.resize(N); for (int i = 0; i < N; ++i) scanf("%lld", &B[i]);
C.resize(N); for (int i = 0; i < N; ++i) scanf("%lld", &C[i]);
for (int i = 0; i < N; ++i) {
A[i] += C[i];
}
Int sumA = 0;
Int oth = 0;
for (int i = 0; i < N; ++i) {
sumA += A[i];
oth += min(A[i], B[i]);
}
auto ans = A;
for (int i = 0; i < N; ++i) {
ans[i] += (oth - min(A[i], B[i]));
}
for (int i = 0; i < N; ++i) {
if (i) printf(" ");
printf("%lld", ans[i]);
}
puts("");
printf("%lld\n", sumA);
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 98ms
memory: 14112kb
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 ...9 60073701743821 60073472434579'