QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#773734 | #9784. Donkey and Puss in Boots | ucup-team2112# | WA | 1ms | 3824kb | C++20 | 493b | 2024-11-23 10:10:53 | 2024-11-23 10:11:02 |
Judging History
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;
}
Details
Tip: Click on the bar to expand more detailed information
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'