提交时间:2020-08-23 19:26:30

运行 ID: 6077

a#include<bits/stdc++.h> using namespace std; int esp=1e-8; int compare(double a,double b){ if(fabs(a-b)<=esp)return 0; if((a-b)>0)return 1; } int compare1(double a,double b){ if(fabs(a-b)<=esp)return 0; if((a-b)<0)return -1; if((a-b)>0)return 1; } int main(){ double a,b,c,d; while(scanf("%d%d%d%d",&a,&b,&c,&d)!=EOF){ if(compare(a,10))a=0.5; if(compare(b,10))b=0.5; if(compare(c,10))c=0.5; if(compare(d,10))d=0.5; if(compare(a+b,10.5)){ a=0; b=0; } if(compare(c+d,10.5)){ c=0; d=0; } cout<<compare1(a+b,c+d)<<endl; } }