QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#355424#8287. Caught in the Middlemaxplus#WA 0ms3496kbC++20296b2024-03-16 17:37:512024-03-16 17:37:52

Judging History

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

  • [2024-03-16 17:37:52]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3496kb
  • [2024-03-16 17:37:51]
  • 提交

answer

#include <iostream>

using namespace std;

int main() {
  cin.tie(0)->sync_with_stdio(0);
  for (int tc = (cin >> tc, tc); tc--; ) {
    string s; cin >> s >> s;
    bool win = 0;
    for (bool x = 0; auto c: s) win |= c != "LR"[x ^= 1];
    cout << (win? "Alice\n": "Bob\n");
  }
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3496kb

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
Bob
Alice
Alice
Alice
Bob
Alice
Alice
Alice
Alice
Alice
Alice
Bob
Alice
Alice
Alice

result:

wrong answer 6th lines differ - expected: 'Alice', found: 'Bob'