Advertisement
noshin98

uva 12696

Oct 1st, 2016
339
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.54 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     long long t,i,count=0;
  5.     double l,w,d,m;
  6.     while(scanf("%lld",&t)==1)
  7.     {
  8.         for(i=1;i<=t;i++)
  9.         {
  10.             scanf("%lf%lf%lf%lf",&l,&w,&d,&m);
  11.             if((l<=56.00&&w<=45.00&&d<=25.00&&m<=7.00)||(l+w+d<=125.00&&m<=7.00))
  12.                {
  13.                    printf("1\n");
  14.                    count=count+1;
  15.                }
  16.                else
  17.                 {
  18.                     printf("0\n");
  19.                 }
  20.         }
  21.         printf("%lld\n",count);
  22.     }
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement