QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#745678 | #5596. I Could Have Won | panned | WA | 0ms | 3592kb | C++14 | 506b | 2024-11-14 11:03:52 | 2024-11-14 11:03:53 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define YES cout << "YES\n"
#define NO cout << "NO\n"
void SOLVE() {
string s;
cin >> s;
int countA = 0;
int countB = 0;
int count = 0;
set<int> win;
for(int i=0; i<s.length();i++){
if(s[i]=='A'){
countA++;
}else{
countB++;
}
if(countA>countB){
win.insert(countA);
}
}
cout << win.size() << "\n";
for(int wi: win){
cout << wi << " ";
}
}
int main(){
SOLVE();
}
詳細信息
Test #1:
score: 0
Wrong Answer
time: 0ms
memory: 3592kb
input:
BBAAABABBAAABB
output:
4 3 4 6 7
result:
wrong answer 1st lines differ - expected: '3', found: '4'