Round 678(Div 2) reorder problem

Правка en2, от 97rajmath, 2020-10-25 08:37:32

This problem was quite easy and I coded it and checked it in my local machine. And it was giving me the right answer.(passing all the pretests) but for some reason after submitting the ONLINE_JUDGE was giving me a WRONG_ANSWER response. Here is the code. Can anyone tell me what's wrong in it?

int main(){ fileIO();

int t;
scanf("%d",&t);
while(t--){
    int n;ll m;

    scanf("%d",&n);
    scanf("%d",&m);

    ll a[n],sum=0;
    for(int i=0;i<n;i++)
       scanf("%d",&a[i]);       

    for(int i=0;i<n;i++)
       sum+=a[i];

    if((int)sum==m)
       cout<<"YES"<<endl;
    else
       cout<<"NO"<<endl;
}   
return 0;

}

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en4 Английский 97rajmath 2020-10-25 08:38:29 4 Tiny change: ' main(){\n int t;\' -> ' main(){\n\n\n int t;\'
en3 Английский 97rajmath 2020-10-25 08:38:02 14 Tiny change: 'main(){\n fileIO();\n\n int t;\' -> 'main(){\n int t;\'
en2 Английский 97rajmath 2020-10-25 08:37:32 327
en1 Английский 97rajmath 2020-10-25 08:36:52 329 Initial revision (published)