fork download
  1. #include <cstdio>
  2. #include <iostream>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int n,j,sum=0;
  8. scanf("%d",&n);
  9. while(n)
  10. {
  11. scanf("%d",&j);
  12. if(j-25>sum) break;
  13. sum+=25;
  14. n--;
  15. }
  16. if(n) printf("NO\n");
  17. else printf("YES\n");
  18. return 0;
  19. }
  20.  
Success #stdin #stdout 0s 2732KB
stdin
4
50 50 25 25
stdout
NO