QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#865959#7533. Jeopardized Bettingushg8877#WA 1ms3584kbC++20573b2025-01-22 09:43:392025-01-22 09:43:43

Judging History

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

  • [2025-01-22 09:43:43]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3584kb
  • [2025-01-22 09:43:39]
  • 提交

answer

#include <bits/stdc++.h>
#define int long long
#define mid ((l+r)>>1)
#define lowbit(i) (i&(-i))
using namespace std;
int dp[35][35];
signed main(){
	int n; cin>>n;
	for(int j=0;j<n;j++) dp[n][j]=(1ll<<(2*n+1)),dp[j][n]=0;
	for(int i=n-1;i>=0;i--){
		for(int j=n-1;j>=0;j--){
			dp[i][j]=(dp[i][j+1]+dp[i+1][j])/2;
		}
	}
	assert(dp[0][0]==(1ll<<(2*n)));
	int nowx=0,nowy=0;
	while(nowx!=n&&nowy!=n){
		cout<<llabs(dp[nowx+1][nowy]-dp[nowx][nowy])<<"\n"; fflush(stdout);
		string ret; cin>>ret;
		if(ret=="Win") nowx++;
		else nowy++;
	}
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 1ms
memory: 3584kb

input:

3
Lost
Won
Won

output:

24
24
16

result:

wrong answer format  Unexpected end of file - int64 expected