QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#345487 | #8287. Caught in the Middle | ucup-team191# | WA | 0ms | 3744kb | C++23 | 709b | 2024-03-07 00:30:47 | 2024-03-07 00:30:48 |
Judging History
answer
#include <bits/stdc++.h>
#define x first
#define y second
using namespace std;
using ll=long long;
using pii=pair<int,int>;
using pll=pair<ll,ll>;
using vi=vector<int>;
using vl=vector<ll>;
#define pb push_back
#define all(a) begin(a),end(a)
const int N=300010,MOD=1e9+7;
const char en='\n';
const ll LLINF=1ll<<60;
int n;
int main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
int T; cin >> T;
for(;T--;) {
string s; int n;
cin >> n >> s;
string los;
if(n % 2 == 0) {
for(int i = 0;i < n / 2;i++){
los.push_back('R');
los.push_back('L');
}
if(los == s) cout << "Bob\n";
else cout << "Alice\n";
} else {
cout << "Alice\n";
}
}
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3744kb
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'