Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
5151 admin 十点半 C++ 通过 100 34 MS 256 KB 412 2025-01-23 13:55:42

Tests(1/1):


#include <bits/stdc++.h> using namespace std; int main(){ double 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; double e = a + b; double f = c + d; if (e > 10.5) e = 0; if (f > 10.5) f = 0; if (e > f) cout<<1<<endl; else if (e == f) cout<<0<<endl; else if (e < f) cout<<-1<<endl; } return 0; }


测评信息: