QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#344665#7964. 转化knightzzz1#WA 70ms18984kbC++171.0kb2024-03-04 21:06:312024-03-04 21:06:31

Judging History

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

  • [2024-03-04 21:06:31]
  • 评测
  • 测评结果:WA
  • 用时:70ms
  • 内存:18984kb
  • [2024-03-04 21:06:31]
  • 提交

answer

#include<bits/stdc++.h>

using namespace std;
const int N = 4e5 ;
using ll = long long;
int n,l,r;
ll a[ N ] , b[ N ] , c[ N ] , d[ N ] ,ans[ N ];
double p;

void slove(){
    cin >> n ;
    for( int i = 1 ; i <= n ; i++ ) cin >> a[ i ] ;
    for( int i = 1 ; i <= n ; i++ ) cin >> b[ i ] ;
    for( int i = 1 ; i <= n ; i++ ) cin >> c[ i ] ;
    ll sum = 0 ,dum = 0 ;
    for( int i = 1 ; i <= n ; i ++ ){
        if( a[ i ] > 0 ){
            sum += ( a[ i ] + c[ i ] ) ;
            d[ i ] = min( b[ i ] , a[ i ] + c[ i ] ) ;
            dum += d[ i ] ;
        }
    }
    for( int i = 1 ; i <= n ; i++ ){
        ans[ i ] =  ( dum - d[ i ] ) ;
        if( a[ i ] > 0 ){
            ans[ i ] += a[ i ] + c[ i ]  ;
        }
        cout << ans[ i ] << " ";
    }
    cout << endl << sum << endl;
}

int main(){
 
    cin.tie(0);
    cout.tie(0);
    ios::sync_with_stdio(false);    

    int T  = 1 ; 
    // cin >> T ;
    while( T -- ){
        slove();
    }
    
    return 0;      
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

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:

42482492819203 42482492819203 42482492819203 42482502170700 42482492819203 42482492819203 42482548571563 42482492819203 42482864801662 42482492819203 42482492819203 42482492819203 42482492819203 42482492819203 42482492819203 42482687628444 42482570776928 42482492819203 42482651991328 42482492819203 ...

result:

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