QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#370710#8224. Caught in the MiddleNetwork_ErrorCompile Error//C++14543b2024-03-29 15:33:042024-03-29 15:33:06

Judging History

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

  • [2024-03-29 15:33:06]
  • 评测
  • [2024-03-29 15:33:04]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#define pb push_back
#define pii pair<int,int>
#define piii tuple<int,int,int>
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
#define deb(var) cerr<<#var<<'='<<(var)<<"; "
#define int long long
char c[1000010];
void work(){
	cin>>n;
	cin>>(c+1);
	int n=strlen(c+1);
	if(c[1]='L'||c[n]=='R')cout<<"Alice\n";
	else cout<<"Bob\n";
}
signed main(){
	ios::sync_with_stdio(0),
	cin.tie(0),cout.tie(0);
	int T=1;cin>>T;while(T--)work();return 0;
}


Details

answer.code: In function ‘void work()’:
answer.code:14:14: error: ‘n’ was not declared in this scope; did you mean ‘yn’?
   14 |         cin>>n;
      |              ^
      |              yn