daily pastebin goal
47%
SHARE
TWEET

Sumepartiale3

dobricean_ioan Aug 10th, 2018 (edited) 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Sa se foloseasca sume partiale:
  2. Se dau un sir cu n numere si m intrebari. O intrebare este reprezentata printr-un numar natural J.
  3. Pt fiecare intrebare sa se raspunda daca suma secventei [1,j] este mai mare decat suma secventei [j,n]
  4.  
  5. Ex.
  6. Intrare
  7. 5
  8. 5 6 1 2 3
  9. 2
  10. 1
  11. 3
  12.  
  13. Iesire
  14. NU
  15. DA
  16.  
  17. Explicatie:
  18. Secventa [1,1] este mai mica ca suma decat [1,5]
  19. Secventa [1,3] este mai mare ca suma decat [3,5]
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top