QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#782490 | #9784. Donkey and Puss in Boots | Zgln | WA | 0ms | 3712kb | C++17 | 263b | 2024-11-25 20:13:51 | 2024-11-25 20:13:55 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
int main(){
int sum=0,max1=0;
int n,m;
cin>>n;
m=n;
while(m--){
int a;
cin>>a;
if(a>max1)max1=a;
sum+=a;
}
if((sum-max1)<n){
cout<<"Donkey";
}
else{
cout<<"Puss in Boots";
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3508kb
input:
2 2 2
output:
Puss in Boots
result:
ok single line: 'Puss in Boots'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3504kb
input:
4 0 47 0 0
output:
Donkey
result:
ok single line: 'Donkey'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3568kb
input:
4 0 47 0 0
output:
Donkey
result:
ok single line: 'Donkey'
Test #4:
score: 0
Accepted
time: 0ms
memory: 3708kb
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: 3712kb
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: 3688kb
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: 3628kb
input:
5 0 0 0 0 0
output:
Donkey
result:
wrong answer 1st lines differ - expected: 'Puss in Boots', found: 'Donkey'