QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#336908#8287. Caught in the Middleucup-team1134#WA 0ms3632kbC++23916b2024-02-24 23:29:072024-02-24 23:29:09

Judging History

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

  • [2024-02-24 23:29:09]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3632kb
  • [2024-02-24 23:29:07]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return true; } return false; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return true; } return false; }
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define mp make_pair
#define si(x) int(x.size())
const int mod=998244353,MAX=300005,INF=1<<30;

int main(){
    
    std::ifstream in("text.txt");
    std::cin.rdbuf(in.rdbuf());
    cin.tie(0);
    ios::sync_with_stdio(false);
    
    
    int Q;cin>>Q;
    while(Q--){
        int N;cin>>N;
        string S;cin>>S;
        bool f=true;
        f&=(N%2==0);
        for(int i=0;i<N;i++){
            if(i%2==0) f&=(S[i]=='R');
            else f&=(S[i]=='L');
        }
        
        if(f) cout<<"Bob\n";
        else cout<<"Alice\n";
    }
}


詳細信息

Test #1:

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

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'