Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
229957 顾欣薇 *小美的外卖订单 C++ 运行出错 60 0 MS 284 KB 438 2024-01-07 14:17:00

Tests(3/5):


#include <bits/stdc++.h> using namespace std; int main() { int n; double a[1005],b[1005],sum1=0.0,sum2=0.0,c,d; bool t=0; cin >> n; for (int i=1;i<=n;i++) { cin >> a[i] >> b[i]; if (b[i]>a[i]) { t=1; } sum1+=b[i]; sum2+=a[i]; } cin >> c >> d; if (sum2>=c) { sum2-=d; } if (t==1) { cout << "error" << endl; return 0; } cout << fixed << setprecision(2) << min(sum1,sum2); return 0; }


测评信息:

输入

                    

输出

                    

答案

                    

系统信息

exit code: 0, checker exit code: 0

输入

                    

输出

                    

答案

                    

系统信息

exit code: 0, checker exit code: 0

输入

                    

输出

                    

答案

                    

系统信息

exit code: 0, checker exit code: 0

输入

10000
11 3.64
11 2.73
10 3.64
10 1.82
10 7.27
11 6.36
10 11.91
11 4.55
10 7.27
10 2.73
10 1.82
11 7.27
10 0.00
10 4.55
10 3.64
11 9.09
11 9.09
10 4.55
11 8.18
11 2.73
10 4.55
10 8.18
11 8.18
10 1.82
...

输出

                    

答案

error

检查日志

Runtime Error:Segmentation fault

系统信息

exit code: 0, checker exit code: 0

输入

10000
11 6.36
10 0.00
10 1.82
10 7.27
11 8.18
10 7.27
10 7.27
10 2.73
10 5.45
10 0.00
11 0.00
11 0.00
10 4.55
10 6.36
11 5.45
11 0.00
11 3.64
10 0.00
10 6.36
10 4.55
11 0.91
11 7.27
10 7.27
11 8.18
1...

输出

                    

答案

46045.75

检查日志

Runtime Error:Segmentation fault

系统信息

exit code: 0, checker exit code: 0