QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#825885#9784. Donkey and Puss in BootsZawos#WA 1ms3744kbC++14486b2024-12-22 00:12:042024-12-22 00:12:05

Judging History

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

  • [2024-12-22 00:12:05]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3744kb
  • [2024-12-22 00:12:04]
  • 提交

answer

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

using ll = long long;
using vi = vector<int>;
using vll = vector<ll>;

#define rep(i, a, b) for (int i = a; i < b; i++)
#define all(x) x.begin(), x.end()
int main() {
    ios_base::sync_with_stdio(false); cin.tie(0);
    ll n; cin >> n;
    vll nums(n); rep(i, 0, n) cin >> nums[i];

    ll mx = *max_element(all(nums)), sum = accumulate(all(nums), 0ll);

    cout << (sum - mx >= n ? "Puss in Boots" : "Donkey") << "\n";
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

2
2 2

output:

Puss in Boots

result:

ok single line: 'Puss in Boots'

Test #2:

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

input:

4
0 47 0 0

output:

Donkey

result:

ok single line: 'Donkey'

Test #3:

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

input:

4
0 47 0 0

output:

Donkey

result:

ok single line: 'Donkey'

Test #4:

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

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

input:

5
8 5 1 1 0

output:

Puss in Boots

result:

ok single line: 'Puss in Boots'

Test #6:

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

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

input:

7
13 0 1 0 0 0 0

output:

Donkey

result:

ok single line: 'Donkey'

Test #8:

score: -100
Wrong Answer
time: 1ms
memory: 3480kb

input:

5
0 0 0 0 0

output:

Donkey

result:

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