QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#809428#9784. Donkey and Puss in BootsAfterlife#WA 0ms3808kbC++20392b2024-12-11 15:00:032024-12-11 15:00:03

Judging History

This is the latest submission verdict.

  • [2024-12-11 15:00:03]
  • Judged
  • Verdict: WA
  • Time: 0ms
  • Memory: 3808kb
  • [2024-12-11 15:00:03]
  • Submitted

answer

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



int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n;
    cin>>n;
    vector<int> a(n);
    long long s=0;
    for(auto &x:a)
        cin>>x,s+=x;
    int win=0;
    for(auto x:a)
        if(s-x<n)
            win=1;
    if(win)
        cout<<"Donkey\n";
    else    
        cout<<"Puss in Boots\n";
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

2
2 2

output:

Puss in Boots

result:

ok single line: 'Puss in Boots'

Test #2:

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

input:

4
0 47 0 0

output:

Donkey

result:

ok single line: 'Donkey'

Test #3:

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

input:

4
0 47 0 0

output:

Donkey

result:

ok single line: 'Donkey'

Test #4:

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

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

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

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

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

input:

5
0 0 0 0 0

output:

Donkey

result:

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