QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#338848 | #8224. Caught in the Middle | HYX1124 | 0 | 1ms | 3688kb | C++17 | 974b | 2024-02-26 13:28:22 | 2024-02-26 13:28:22 |
answer
#include <bits/stdc++.h>
#ifndef ONLINE_JUDGE
#include "lib.h"
#endif
#define rep(i, min, max) for(int i = (min); i <= (max); ++i)
#define nrep(i, max, min) for(int i = (max); i >= (min); --i)
#define reads(str) (scanf("%s", str + 1), strlen(str + 1))
#define case() int Ts = read(); rep(T, 1, Ts)
#define putf(flag) puts((flag) ? "YES" : "NO")
#define put(x) printf("%d ", x)
#define putl(x) printf("%lld ", x)
#define endl() putchar('\n')
using namespace std;
typedef long long ll;
inline int read()
{
int now=0; bool nev=false; char c=getchar();
while(c<'0' || c>'9') { if(c=='-') nev=true; c=getchar(); }
while(c>='0' && c<='9') { now=(now<<1)+(now<<3)+(c&15); c=getchar(); }
return nev?-now:now;
}
const int N = 1e6 + 10;
char s[N];
int main() {
case() {
int n = read();
reads(s);
bool fl = n % 2 == 0;
rep(i, 1, n / 2) fl &= (s[i * 2 - 1] == 'R' && s[i * 2] == 'L');
puts(fl ? "Bob" : "Alice");
}
}
详细
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 0
Wrong Answer
time: 1ms
memory: 3688kb
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'
Subtask #2:
score: 0
Skipped
Dependency #1:
0%
Subtask #3:
score: 0
Skipped
Dependency #1:
0%
Subtask #4:
score: 0
Skipped
Dependency #1:
0%