QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#780864#9784. Donkey and Puss in BootsGenshinImpactShutdown#WA 0ms3708kbC++14510b2024-11-25 13:40:142024-11-25 13:40:15

Judging History

This is the latest submission verdict.

  • [2024-11-25 13:40:15]
  • Judged
  • Verdict: WA
  • Time: 0ms
  • Memory: 3708kb
  • [2024-11-25 13:40:14]
  • Submitted

answer

#include<bits/stdc++.h>
#define All(x) x.begin(),x.end()
using namespace std;
using ull=unsigned long long;
using ll=long long;
using bint=__int128;
using ld=long double;
using pii=pair<int,int>;
using vi=vector<int>;
const int N=1e5+5;
int n,a[N];
int main()
{
	ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
	cin>>n;for(int i=1;i<=n;i++)cin>>a[i];
	ll s=0;int mx=0;
	for(int i=1;i<=n;i++)s+=a[i],mx=max(mx,a[i]);
	if(s-mx<n)cout<<"Donkey\n";
	else cout<<"Puss in Boots\n";
	return 0;
}

詳細信息

Test #1:

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

input:

2
2 2

output:

Puss in Boots

result:

ok single line: 'Puss in Boots'

Test #2:

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

input:

4
0 47 0 0

output:

Donkey

result:

ok single line: 'Donkey'

Test #3:

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

input:

4
0 47 0 0

output:

Donkey

result:

ok single line: 'Donkey'

Test #4:

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

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

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

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

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

input:

5
0 0 0 0 0

output:

Donkey

result:

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