QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#773734#9784. Donkey and Puss in Bootsucup-team2112#WA 1ms3824kbC++20493b2024-11-23 10:10:532024-11-23 10:11:02

Judging History

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

  • [2024-11-23 10:11:02]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3824kb
  • [2024-11-23 10:10:53]
  • 提交

answer

#include <bits/stdc++.h>

int main(){
    std::ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    std::cout.tie(nullptr);
    int n;
    std::cin >> n;
    std::vector<int> a(n);
    long long sum = 0;
    for (int &x : a) std::cin >> x, sum += x;
    bool nice = false;
    for (int x : a) {
        if (x && sum - x < n) {
            nice = false;
            break;
        }
    }
    std::cout << (nice ? "Donkey" : "Puss in Boots" ) << "\n";
    return 0;
}

详细

Test #1:

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

input:

2
2 2

output:

Puss in Boots

result:

ok single line: 'Puss in Boots'

Test #2:

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

input:

4
0 47 0 0

output:

Puss in Boots

result:

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