QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#337077 | #8287. Caught in the Middle | ucup-team992# | WA | 0ms | 3628kb | C++20 | 634b | 2024-02-25 03:05:29 | 2024-02-25 03:05:30 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define ar array
typedef int uci;
#define int long long
#define ll long long
void solve(){
int n; cin >> n;
string s; cin >> s;
if (s[0] == 'L' or s[n-1] == 'R') {
cout << "Alice\n";
}
else {
for (int i = 0; i < n-1; i++) {
if (s[i] == s[i+1]) {
cout << "Alice\n";
return;
}
}
cout << "Bob\n";
}
}
uci main(){
ios_base::sync_with_stdio(0);
cin.tie(0), cout.tie(0);
int t; cin >> t;
while (t--) {
solve();
}
}
详细
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3628kb
input:
20 10 RLRRRRLLRR 10 LRLLLLRRLR 6 RLRLRL 10 LLRLRRRRLR 6 LRRLLL 3 RLR 5 LLRRR 6 RRRRRL 9 LRRRLRRLR 1 R 10 RRRLLRRLLL 6 LRLLLR 9 LLRLRLRLR 7 RRRRLRR 2 LL 10 RRRLLRRLRR 2 RL 7 RRLRRLR 3 LLR 10 LLRLRRRLLR
output:
Alice Alice Bob Alice Alice Alice Alice Alice Alice Alice Alice Alice Alice Alice Alice Alice Bob Alice Alice Alice
result:
wrong answer 11th lines differ - expected: 'Bob', found: 'Alice'