QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#866433#9784. Donkey and Puss in BootsjimmyywangWA 0ms3584kbC++231.2kb2025-01-22 15:08:552025-01-22 15:09:00

Judging History

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

  • [2025-01-22 15:09:00]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3584kb
  • [2025-01-22 15:08:55]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define f(i,a,b) for(ll i=a;i<=b;i++)
#define wt int tt=d;while(tt--)
#define py puts("Puss in Boots")
#define pn puts("Donkey")
#define fe(i,e) for(int i=0;i<e.size();i++)
#define vi vector<ll>
inline ll rd() {
	ll x=0,f=1;
	char c=getchar();
	while(!isdigit(c)){if(c=='-')f=-1;c=getchar();}
	while(isdigit(c))x=x*10+c-'0',c=getchar();
	return x*f;
}
namespace binom{
	const ll Lim=300010,mod=998244353;
	ll jc[Lim],inv[Lim],inc[Lim];
	void pre(){
		jc[0]=jc[1]=inc[0]=inc[1]=inv[0]=inv[1]=1;
		f(i,2,Lim-1)jc[i]=jc[i-1]*i%mod,inv[i]=(mod-mod/i)*inv[mod%i]%mod,
		inc[i]=inc[i-1]*inv[i]%mod;
	}ll C(ll n,ll m){if(n<0||m<0||n<m)return 0;return jc[n]*inc[m]%mod*inc[n-m]%mod;}
}
// using namespace binom;
ll dx[4]={0,1,0,-1};
ll dy[4]={1,0,-1,0};
#define d rd()
#define pb push_back
const ll N=300010;
struct edge{ll v,w,nx;}e[N<<1];
ll hd[N],cnt;
void add(ll u,ll v,ll w){e[++cnt]=(edge){v,w,hd[u]};hd[u]=cnt;}
ll qp(ll a,ll b,ll p){
	ll ans=1;while(b){
		if(b&1)ans=ans*a%p;
		a=a*a%p;b>>=1;
	}return ans;
}ll n,m;

int main(){
	ll num=0;n=d;
    f(i,1,n)num+=(d!=0);
    if(num==1)pn;else py;
	return 0;
}

详细

Test #1:

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

input:

2
2 2

output:

Puss in Boots

result:

ok single line: 'Puss in Boots'

Test #2:

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

input:

4
0 47 0 0

output:

Donkey

result:

ok single line: 'Donkey'

Test #3:

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

input:

4
0 47 0 0

output:

Donkey

result:

ok single line: 'Donkey'

Test #4:

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

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

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

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'