QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#774473#9784. Donkey and Puss in Bootsucup-team4893#WA 1ms3708kbC++17614b2024-11-23 13:18:582024-11-23 13:18:59

Judging History

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

  • [2024-11-23 13:18:59]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3708kb
  • [2024-11-23 13:18:58]
  • 提交

answer

#include<iostream>
#include<cstdio>
#define fopen(x, y) freopen(x".in", "r", stdin); freopen(y".out", "w", stdout);
#define int long long
#ifdef int
#define inf 0x3f3f3f3f3f3f3f3fll
#else
#define inf 0x3f3f3f3f
#endif

using namespace std;

int n, a[100005];

void work() {
	int sum = 0, mx = 0;
	cin >> n;
	for(int i = 1; i <= n; i++) {
		cin >> a[i];
		sum += a[i];
		mx = max(mx, a[i]);
	}
	if(sum - mx >= n) {
		cout << "Puss in Boots\n";
	}
	else cout << "Donkey\n";
}

signed main() {
	ios::sync_with_stdio(false); cin.tie(0);
	int _ = 1;
//	cin >> _;
	while(_--) work();
}

詳細信息

Test #1:

score: 100
Accepted
time: 1ms
memory: 3568kb

input:

2
2 2

output:

Puss in Boots

result:

ok single line: 'Puss in Boots'

Test #2:

score: 0
Accepted
time: 1ms
memory: 3660kb

input:

4
0 47 0 0

output:

Donkey

result:

ok single line: 'Donkey'

Test #3:

score: 0
Accepted
time: 1ms
memory: 3632kb

input:

4
0 47 0 0

output:

Donkey

result:

ok single line: 'Donkey'

Test #4:

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

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: 1ms
memory: 3636kb

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

input:

9
5 13 1 0 0 0 0 0 0

output:

Donkey

result:

ok single line: 'Donkey'

Test #7:

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

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

input:

5
0 0 0 0 0

output:

Donkey

result:

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