QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#54555#1373. Rating Problemsnot_so_organic#AC ✓3ms3860kbC++309b2022-10-09 17:44:042022-10-09 17:44:05

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-10-09 17:44:05]
  • 评测
  • 测评结果:AC
  • 用时:3ms
  • 内存:3860kb
  • [2022-10-09 17:44:04]
  • 提交

answer

#include <iostream>
using namespace std ;
int main() {
   int n, k, v, sum=0 ;
   cin >> n >> k ;
   for (int i=0; i<k; i++) {
      cin >> v ;
      sum += v ;
   }
   cout.precision(9);
   cout << (sum - 3 * (n - k)) / (double)n << " " <<
           (sum + 3 * (n - k)) / (double)n << endl ;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 3ms
memory: 3688kb

input:

10 0

output:

-3 3

result:

ok 2 numbers

Test #2:

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

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: 3ms
memory: 3760kb

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: 2ms
memory: 3732kb

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: 2ms
memory: 3696kb

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: 2ms
memory: 3860kb

input:

1 0

output:

-3 3

result:

ok 2 numbers

Test #7:

score: 0
Accepted
time: 1ms
memory: 3728kb

input:

1 1
2

output:

2 2

result:

ok 2 numbers

Test #8:

score: 0
Accepted
time: 2ms
memory: 3700kb

input:

9 7
1
3
2
2
1
1
2

output:

0.666666667 2

result:

ok 2 numbers

Test #9:

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

input:

6 4
-2
-1
-2
0

output:

-1.83333333 0.166666667

result:

ok 2 numbers