QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#795139#9784. Donkey and Puss in Bootsucup-team139WA 0ms3880kbC++23406b2024-11-30 18:03:352024-11-30 18:03:37

Judging History

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

  • [2024-11-30 18:03:37]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3880kb
  • [2024-11-30 18:03:35]
  • 提交

answer

#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main()
{
  ios::sync_with_stdio(false);

  int n;
  cin >> n;

  long long sum = 0;
  vector<int> v(n);
  for (auto &i : v)
  {
    cin >> i;
    sum += i;
  }

  sort(v.rbegin(), v.rend());
  if (sum - v[0] < n)
  {
    cout << "Donkey\n";
  }
  else
  {
    cout << "Puss in Boots\n";
  }
}

详细

Test #1:

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

input:

2
2 2

output:

Puss in Boots

result:

ok single line: 'Puss in Boots'

Test #2:

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

input:

4
0 47 0 0

output:

Donkey

result:

ok single line: 'Donkey'

Test #3:

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

input:

4
0 47 0 0

output:

Donkey

result:

ok single line: 'Donkey'

Test #4:

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

input:

10
5 7 3 0 2 0 0 1 0 0

output:

Puss in Boots

result:

ok single line: 'Puss in Boots'

Test #5:

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

input:

5
8 5 1 1 0

output:

Puss in Boots

result:

ok single line: 'Puss in Boots'

Test #6:

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

input:

9
5 13 1 0 0 0 0 0 0

output:

Donkey

result:

ok single line: 'Donkey'

Test #7:

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

input:

7
13 0 1 0 0 0 0

output:

Donkey

result:

ok single line: 'Donkey'

Test #8:

score: -100
Wrong Answer
time: 0ms
memory: 3580kb

input:

5
0 0 0 0 0

output:

Donkey

result:

wrong answer 1st lines differ - expected: 'Puss in Boots', found: 'Donkey'