QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#337077#8287. Caught in the Middleucup-team992#WA 0ms3628kbC++20634b2024-02-25 03:05:292024-02-25 03:05:30

Judging History

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

  • [2024-02-25 03:05:30]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3628kb
  • [2024-02-25 03:05:29]
  • 提交

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'