Advertisement
SUBANGKAR

12696 - UVA - Protik

Oct 13th, 2016
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.56 KB | None | 0 0
  1. #include<stdio.h>
  2. #include <iostream>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     int t,i,n;
  9.     float a,b,c,d,s;
  10. //    scanf("%d",&t);
  11.     cin>>t;
  12.     n=0;
  13.     for(i=0; i<t; i++)
  14.     {
  15. //        scanf("%f %f %f %f",&a,&b,&c,&d);
  16.         cin>>a>>b>>c>>d;
  17.         s=a+b+c;
  18.         if(a<=56&&b<=45&&c<=25&&d<=7)
  19.         {
  20.             printf("1\n");
  21.             n++;
  22.         }
  23.         else if(s<=125&&d<=7)
  24.         {
  25.             printf("1\n");
  26.             n++;
  27.         }
  28.         else printf("0\n");
  29.  
  30.     }
  31.     printf("%d\n",n);
  32.  
  33.     return 0;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement