Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5. int n;
  6. cin>>n;
  7. while (n--){
  8. int h,w,s,r,p;
  9. cin>>h>>w>>s>>r>>p;
  10. if (h>220 && w>250 && (s>20 || r>6 || p>7)){
  11. cout<<0;
  12. continue;
  13. }
  14. else {
  15. int big(0),high(0),low(0);
  16. if (h>220)
  17. big++;
  18. if (w>250)
  19. big++;
  20. if (s>20)
  21. big++;
  22. if (r>6)
  23. big++;
  24. if (p>7)
  25. big++;
  26.  
  27. if (h>=205 )
  28. high++;
  29. if (w>=225 )
  30. high++;
  31. if (s>=15 )
  32. high++;
  33. if (r>=4 )
  34. high++;
  35. if (p>=5 )
  36. high++;
  37.  
  38. if (h>=190 )
  39. low++;
  40. if (w>=200 )
  41. low++;
  42. if (s>=10 )
  43. low++;
  44. if (r>=2 )
  45. low++;
  46. if (p>=3 )
  47. low++;
  48.  
  49.  
  50. if ( (big>=2 && high>=3) || (low==5 && high>=3) ){
  51. cout<<1;
  52. continue;
  53. }
  54. else {
  55. if ( (big>=1 && high>=2) || (high>=3) ){
  56. cout<<2;
  57. continue;
  58. }
  59. else cout<<3;
  60. }
  61. }
  62.  
  63.  
  64. }
  65. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement