QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#833828#9784. Donkey and Puss in BootsNegationistWA 1ms3780kbC++17649b2024-12-27 03:47:112024-12-27 03:47:12

Judging History

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

  • [2024-12-27 03:47:12]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3780kb
  • [2024-12-27 03:47:11]
  • 提交

answer

#include <bits/stdc++.h>
#define int long long
#define pb push_back
#define ff first
#define ss second
#define pii pair<int,int>
#define vi vector<int>
#define vii vector<pair<int,int>>

using namespace std;

void solve(){
    int n;
    cin >> n;
    vi a(n);
    int sum = 0;
    int mx = 0;
    for(int i=0;i<n;i++){
        int z;
        cin >> z;
        mx = max(mx,z);
        sum+=z;
    }
    int res = sum-mx;
    if(res>=n){
        cout << "Puss in Boots\n";
    } else{
        cout << "Donkey\n";
    }
}

signed main()
{
    ios::sync_with_stdio(0);
    cin.tie(0);
    solve();
    return 0;
}

詳細信息

Test #1:

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

input:

2
2 2

output:

Puss in Boots

result:

ok single line: 'Puss in Boots'

Test #2:

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

input:

4
0 47 0 0

output:

Donkey

result:

ok single line: 'Donkey'

Test #3:

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

input:

4
0 47 0 0

output:

Donkey

result:

ok single line: 'Donkey'

Test #4:

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

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

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

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

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

input:

5
0 0 0 0 0

output:

Donkey

result:

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