Round 678(Div 2) reorder problem
Difference between en2 and en3, changed 14 character(s)
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;↵
}

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en4 English 97rajmath 2020-10-25 08:38:29 4 Tiny change: ' main(){\n int t;\' -> ' main(){\n\n\n int t;\'
en3 English 97rajmath 2020-10-25 08:38:02 14 Tiny change: 'main(){\n fileIO();\n\n int t;\' -> 'main(){\n int t;\'
en2 English 97rajmath 2020-10-25 08:37:32 327
en1 English 97rajmath 2020-10-25 08:36:52 329 Initial revision (published)