QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#801551#9784. Donkey and Puss in Bootsucup-team1430#WA 0ms3692kbC++20622b2024-12-07 01:53:272024-12-07 01:53:28

Judging History

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

  • [2024-12-07 01:53:28]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3692kb
  • [2024-12-07 01:53:27]
  • 提交

answer

#include<bits/stdc++.h>

#define int long long
#define endl '\n'
#define rep(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define pb push_back
#define eb emplace_back
#define debug(x) cout << #x << ": " << x << endl
#define sz(x) (int)((x).size())
#define esp ' '
#define pii pair<int,int>
#define vi vector<int>

using namespace std;

void solve() {
	int n;cin>>n;
	int amt=0;
	rep(i,0,n) {
		int x;cin>>x;
		amt += x != 0;
	}
	if (amt > 1 or amt == 0) {
		cout << "Puss in Boots\n";
		return;
	}
	cout << "Donkey\n";
}

signed main() {
	ios_base::sync_with_stdio(0);cin.tie(0);

	int t=1;
	//cin>>t;
	while(t--) solve();
}

详细

Test #1:

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

input:

2
2 2

output:

Puss in Boots

result:

ok single line: 'Puss in Boots'

Test #2:

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

input:

4
0 47 0 0

output:

Donkey

result:

ok single line: 'Donkey'

Test #3:

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

input:

4
0 47 0 0

output:

Donkey

result:

ok single line: 'Donkey'

Test #4:

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

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

input:

5
8 5 1 1 0

output:

Puss in Boots

result:

ok single line: 'Puss in Boots'

Test #6:

score: -100
Wrong Answer
time: 0ms
memory: 3608kb

input:

9
5 13 1 0 0 0 0 0 0

output:

Puss in Boots

result:

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