45105
56 94
38 17
45 46
94 65
42 77
4 31
71 51
49 31
82 9
11 62
33 30
50 19
52 61
32 8
<308494 bytes omitted>
用户输出
-1395616512
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
编号 | 题目 | 状态 | 分数 | 总时间 | 内存 | 代码 / 答案文件 | 提交者 | 提交时间 |
---|---|---|---|---|---|---|---|---|
#64308 | #1022. jwp的排队难题 | Wrong Answer | 0 | 4566 ms | 1392 K | C++ / 689 B | sgyyds | 2022-03-23 16:10:35 |
#include <iostream>
using namespace std;
int main() {
float a[100001];
float b[100001];
float c[100001];
int k;
cin >> k;
int i;
int j = 0;
int d = 0;
for (i = 0; i < k; i++) {
cin >> a[i] >> b[i];
}
long sum = 0;
for (i = j; i < k; i++) {
c[i] = a[i] / b[i];
}
float cmax = c[j];
float bmax = b[j];
float amax = a[j];
int t1 = j;
int flag = 0;
for (j = 0; j < k; j++) {
for (i = j + 1; i < k; i++) {
if (c[i] > cmax) {
t1 = i;
cmax = c[i];
bmax = b[i];
amax = a[i];
flag = 1;
}
}
if (flag == 1) {
b[t1] = b[j];
b[j] = bmax;
a[t1] = a[j];
a[j] = amax;
c[t1] = c[j];
c[j] = cmax;
}
d = bmax + d;
sum = sum + amax * d;
}
cout << sum;
}
45105
56 94
38 17
45 46
94 65
42 77
4 31
71 51
49 31
82 9
11 62
33 30
50 19
52 61
32 8
<308494 bytes omitted>
用户输出
-1395616512
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
6667
81 6
83 71
57 69
97 27
5 84
20 77
28 77
77 57
97 49
40 18
78 39
41 69
14 11
99 1
<45515 bytes omitted>
用户输出
-2094993920
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
55457
60 47
63 7
81 14
91 88
2 83
4 35
80 77
55 46
97 57
65 10
56 14
15 43
88 3
19 62
<379227 bytes omitted>
用户输出
-913268224
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0
54839
31 85
77 24
87 83
9 18
35 74
88 40
59 14
47 63
50 31
17 40
1 23
71 10
43 69
24 1
<374961 bytes omitted>
用户输出
-21793740
Special Judge 信息
Files user_out and answer differ
系统信息
Exited with return code 0