QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#331197#1373. Rating Problemsweilaifuture#AC ✓0ms3972kbC++14304b2024-02-18 03:19:192024-02-18 03:19:20

Judging History

你现在查看的是最新测评结果

  • [2024-02-18 03:19:20]
  • 评测
  • 测评结果:AC
  • 用时:0ms
  • 内存:3972kb
  • [2024-02-18 03:19:19]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;

int main() {
    double n, k, sum = 0, x;
    cin >> n >> k;

    for (int i = 1; i <= k; i++) {
        cin >> x;
        sum += x;
    }

    cout << fixed << setprecision(5) << (sum - 3 * (n - k))/n << " " << (sum + 3 * (n - k))/n << endl;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3964kb

input:

10 0

output:

-3.00000 3.00000

result:

ok 2 numbers

Test #2:

score: 0
Accepted
time: 0ms
memory: 3912kb

input:

10 10
3
2
1
0
-1
-2
-3
-2
-1
0

output:

-0.30000 -0.30000

result:

ok 2 numbers

Test #3:

score: 0
Accepted
time: 0ms
memory: 3904kb

input:

10 10
0
0
0
0
0
0
0
0
0
0

output:

0.00000 0.00000

result:

ok 2 numbers

Test #4:

score: 0
Accepted
time: 0ms
memory: 3860kb

input:

10 10
3
3
3
3
3
3
3
3
3
3

output:

3.00000 3.00000

result:

ok 2 numbers

Test #5:

score: 0
Accepted
time: 0ms
memory: 3972kb

input:

10 10
-3
-3
-3
-3
-3
-3
-3
-3
-3
-3

output:

-3.00000 -3.00000

result:

ok 2 numbers

Test #6:

score: 0
Accepted
time: 0ms
memory: 3912kb

input:

1 0

output:

-3.00000 3.00000

result:

ok 2 numbers

Test #7:

score: 0
Accepted
time: 0ms
memory: 3844kb

input:

1 1
2

output:

2.00000 2.00000

result:

ok 2 numbers

Test #8:

score: 0
Accepted
time: 0ms
memory: 3724kb

input:

9 7
1
3
2
2
1
1
2

output:

0.66667 2.00000

result:

ok 2 numbers

Test #9:

score: 0
Accepted
time: 0ms
memory: 3920kb

input:

6 4
-2
-1
-2
0

output:

-1.83333 0.16667

result:

ok 2 numbers