QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#785017#9784. Donkey and Puss in Bootsjaker#WA 0ms3628kbC++14388b2024-11-26 16:38:192024-11-26 16:38:22

Judging History

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

  • [2024-11-26 16:38:22]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3628kb
  • [2024-11-26 16:38:19]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i,j,k) for(int i = j;i <= k;++i)
int n;
int a[1000100],mx;
ll sum = 0;
unordered_map<ll,int>lst;
int main() {
    cin >> n;
    rep(i,1,n) cin >> a[i] , mx = max( mx , a[i] ) , sum += a[i];
    if( sum - mx >= n )
        puts("Puss in Boots");
    else 
        puts("Donkey");
    return 0;
}

详细

Test #1:

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

input:

2
2 2

output:

Puss in Boots

result:

ok single line: 'Puss in Boots'

Test #2:

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

input:

4
0 47 0 0

output:

Donkey

result:

ok single line: 'Donkey'

Test #3:

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

input:

4
0 47 0 0

output:

Donkey

result:

ok single line: 'Donkey'

Test #4:

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

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: 3608kb

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: 3628kb

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: 3600kb

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: 3620kb

input:

5
0 0 0 0 0

output:

Donkey

result:

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