NEED HELP WITH 1512D PROBLEM

Revision en3, by PHANTOM_23, 2023-01-19 20:05:42

Here's link to the problem. IN this problem u r given an array with n+2 element i.e n elements n+1 element is the sum of the whole n elements and n+2 element is an integer in range 1 to 10e9, this array is now shuffled and we must retrieve these n element. It gave error on test 7 saying "wrong answer too big sum of the array 'a' (test case 4)" .could someone please point me where iam going wrong .Thank you very much. My submission(code)

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en3 English PHANTOM_23 2023-01-19 20:05:42 23 Tiny change: 'test/1512/submission/189760057) to the p' -> 'test/1512/problem/D) to the p' (published)
en2 English PHANTOM_23 2023-01-19 20:02:10 15 (saved to drafts)
en1 English PHANTOM_23 2023-01-19 19:14:47 607 Initial revision (published)