document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. #include<iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. long int n;
  7. cin>>n;
  8. long int* arr = new long int[n];
  9.  
  10. for(int i=0;i<n;i++)
  11. {
  12. cin>>arr[i];
  13. }
  14.  
  15. long int count=0;
  16. long int headSum=0,rearSum=0;
  17. for(int i=0;i<n;i++)
  18. {
  19. headSum+=arr[i];
  20. rearSum+=arr[n-1-i];
  21.  
  22. if(headSum==rearSum)
  23. {
  24. count++;
  25. }
  26. }
  27. cout<<count<<endl;
  28.  
  29. return 0;
  30. }
');