2 solutions

  • 0
    @ 2026-5-31 18:07:27

    #include<bits/stdc++.h> using namespace std; int main() { int a; cin>>a; int d=0; int e=0; for(int i=1;i<=a;i++) { char b,c; cin>>b>>c; if(b=='J' and c=='B') { d++; } else if(b=='S' and c=='J') { d++; } else if(b=='B' and c=='S') { d++; } else if(c=='J' and b=='B') { e++; } else if(c=='S' and b=='J') { e++; } else if(c=='B' and b=='S') { e++; } } if(e>d) { cout<<"xiaoke"; } else if(d>e) { cout<<"xiaoyan"; } else { cout<<"QAQ"; } return 0; }

    Information

    ID
    3477
    Time
    1000ms
    Memory
    64MiB
    Difficulty
    1
    Tags
    # Submissions
    54
    Accepted
    18
    Uploaded By