QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#764311#7964. 转化EZGG#WA 70ms11444kbC++231009b2024-11-20 08:38:292024-11-20 08:38:43

Judging History

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

  • [2024-11-20 08:38:43]
  • 评测
  • 测评结果:WA
  • 用时:70ms
  • 内存:11444kb
  • [2024-11-20 08:38:29]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
void solve()
{
    ll n;
    cin >> n;
    vector<ll> a(n), b(n), c(n);
    ll sum = 0, ans = 0;
    for (ll i = 0; i < n; i++)
        cin >> a[i];
    for (ll i = 0; i < n; i++)
        cin >> b[i];
    for (ll i = 0; i < n; i++)
    {
        cin >> c[i];
        if (a[i] != 0)
        {
            sum += min(a[i] + c[i], b[i]);
            ans += a[i] + c[i];
        }
        else{
            sum+=min(c[i]+1,b[i])-1;
            ans+=c[i];
        }
    }
    for (int i=0;i<n;i++)
    {
        if(a[i]!=0)
        {
            cout<<sum-min(a[i]+c[i],b[i])+a[i]+c[i]<<' ';
        }else{
            cout<<sum-min(c[i]+1,b[i])+c[i]<<' ';
        }
    }
    cout<<"\n"<<ans;
}
int main()
{
#if !LOCAL
    ios::sync_with_stdio(0);
    cin.tie(0);
#endif
    int tt = 1;
    // cin >> tt;
    while (tt--)
        solve();
#if LOCAL
    system("pause");
#endif
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 70ms
memory: 11444kb

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:

60073965049723 60073472376204 60073472376204 60073481727701 60073472376204 60073788737329 60073528128564 60073472376204 60073844358663 60073784179152 60073472376203 60073472376203 60073948665984 60073472376204 60073472376203 60073667185445 60073550333929 60073472376204 60073631548329 60073472376204 ...

result:

wrong answer 1st lines differ - expected: '60073965049724 60073472376204 ...4 60073701685447 60073472376204', found: '60073965049723 60073472376204 ... 60073701685446 60073472376203 '