Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int main()
- {
- int n;
- cin>>n;
- while (n--){
- int h,w,s,r,p;
- cin>>h>>w>>s>>r>>p;
- if (h>220 && w>250 && (s>20 || r>6 || p>7)){
- cout<<0;
- continue;
- }
- else {
- int big(0),high(0),low(0);
- if (h>220)
- big++;
- if (w>250)
- big++;
- if (s>20)
- big++;
- if (r>6)
- big++;
- if (p>7)
- big++;
- if (h>=205 )
- high++;
- if (w>=225 )
- high++;
- if (s>=15 )
- high++;
- if (r>=4 )
- high++;
- if (p>=5 )
- high++;
- if (h>=190 )
- low++;
- if (w>=200 )
- low++;
- if (s>=10 )
- low++;
- if (r>=2 )
- low++;
- if (p>=3 )
- low++;
- if ( (big>=2 && high>=3) || (low==5 && high>=3) ){
- cout<<1;
- continue;
- }
- else {
- if ( (big>=1 && high>=2) || (high>=3) ){
- cout<<2;
- continue;
- }
- else cout<<3;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement