提交时间:2020-08-22 22:38:00

运行 ID: 5983

#include <iostream> using namespace std; double a[100]={0,1,2,3,4,5,6,7,8,9,10,0.5,0.5,0.5}; int main(){ int d1,d2,d3,d4; while(cin>>d1>>d2>>d3>>d4) { // if((a[d1]+a[d2])>>a[d3]+a[d4]) cout<<"1"<<endl; // else if double s1=a[d1]+a[d2]; double s2=a[d3]+a[d4]; if(s1>10.5)s1=0; if(s2>10.5)s2=0; if(s1>s2)cout<<1<<endl; else if(s1==s2)cout<<0<<endl; else cout<<-1<<endl; } return 0; }