提交时间:2025-02-15 10:57:49

运行 ID: 5641

#include <bits/stdc++.h> using namespace std; int main() { float a,b,c,d; while(cin>>a>>b>>c>>d) { if(a>10) { a=0.5; } if(b>10) { b=0.5; } if(c>10) { c=0.5; } if(d>10) { d=0.5; } float A=a+b; float B=c+d; if(A>10.5) { A=0; } if(B>10.5) { B=0; } if(A>B) { cout<<"1"<<endl; } else if(A==B) { cout<<"0"<<endl; } else { cout<<"-1"<<endl; } } return 0; }