QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#331192#1373. Rating Problemsjhtang2#AC ✓0ms3952kbC++14330b2024-02-18 03:17:172024-02-18 03:17:19

Judging History

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

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

answer

// Source: https://usaco.guide/general/io

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

int main() {
	int n, k;
	cin >> n >> k;
	int sum = 0;	
	for (int i = 0; i < k; i++) {
		int r;
		cin >> r;
		sum += r;
	}

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

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

10 0

output:

-3 3

result:

ok 2 numbers

Test #2:

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

input:

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

output:

-0.3 -0.3

result:

ok 2 numbers

Test #3:

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

input:

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

output:

0 0

result:

ok 2 numbers

Test #4:

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

input:

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

output:

3 3

result:

ok 2 numbers

Test #5:

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

input:

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

output:

-3 -3

result:

ok 2 numbers

Test #6:

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

input:

1 0

output:

-3 3

result:

ok 2 numbers

Test #7:

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

input:

1 1
2

output:

2 2

result:

ok 2 numbers

Test #8:

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

input:

9 7
1
3
2
2
1
1
2

output:

0.666667 2

result:

ok 2 numbers

Test #9:

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

input:

6 4
-2
-1
-2
0

output:

-1.83333 0.166667

result:

ok 2 numbers