QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#508792 | #7656. Eszett | Minyou0713 | WA | 0ms | 3804kb | C++14 | 1018b | 2024-08-07 20:16:04 | 2024-08-07 20:16:05 |
Judging History
answer
#include<iostream>
#include<cstring>
using namespace std;
int main(){
string s;
cin>>s;
int count = 0;
for(int i=0;i<s.size();i++){
s[i]=s[i]+('a'-'A');
if(s[i]=='s'&&s[i-1]=='s'){
count++;
}
}
//cout<<count;
count=count+1;
if(count<2) {
for(int i=0;i<s.size();i++){
cout<<s[i];
}
}
else {
for(int i=0;i<s.size();i++){
cout<<s[i];
}
cout<<endl;
int m = count - 1;
for(int i=0;i<m;i++){
int u = 0;
for(int j=0;j<s.size();j++){
if(s[j]=='s'){
u++;
if(s[j-1]!='s'&&s[j+1]!='s'&&j+1<s.size()) u--;
if(u==i+1){
cout<<"B";
j++;
}
else{
cout<<s[j];
}
}
else {
cout<<s[j];
}
}
cout<<endl;
}
}
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3588kb
input:
AUFREISSEN
output:
aufreissen aufreiBen
result:
ok correct
Test #2:
score: 0
Accepted
time: 0ms
memory: 3732kb
input:
MASSSTAB
output:
massstab maBstab masBtab
result:
ok correct
Test #3:
score: 0
Accepted
time: 0ms
memory: 3724kb
input:
EINDEUTIG
output:
eindeutig
result:
ok correct
Test #4:
score: 0
Accepted
time: 0ms
memory: 3536kb
input:
S
output:
s
result:
ok correct
Test #5:
score: 0
Accepted
time: 0ms
memory: 3592kb
input:
STRASSE
output:
strasse straBe
result:
ok correct
Test #6:
score: 0
Accepted
time: 0ms
memory: 3576kb
input:
M
output:
m
result:
ok correct
Test #7:
score: 0
Accepted
time: 0ms
memory: 3496kb
input:
MZ
output:
mz
result:
ok correct
Test #8:
score: 0
Accepted
time: 0ms
memory: 3572kb
input:
SE
output:
se
result:
ok correct
Test #9:
score: 0
Accepted
time: 0ms
memory: 3804kb
input:
BS
output:
bs
result:
ok correct
Test #10:
score: 0
Accepted
time: 0ms
memory: 3592kb
input:
SS
output:
ss B
result:
ok correct
Test #11:
score: 0
Accepted
time: 0ms
memory: 3572kb
input:
MZN
output:
mzn
result:
ok correct
Test #12:
score: 0
Accepted
time: 0ms
memory: 3760kb
input:
SET
output:
set
result:
ok correct
Test #13:
score: 0
Accepted
time: 0ms
memory: 3572kb
input:
BSC
output:
bsc
result:
ok correct
Test #14:
score: 0
Accepted
time: 0ms
memory: 3728kb
input:
SSH
output:
ssh Bh
result:
ok correct
Test #15:
score: 0
Accepted
time: 0ms
memory: 3592kb
input:
HJS
output:
hjs
result:
ok correct
Test #16:
score: 0
Accepted
time: 0ms
memory: 3500kb
input:
SUS
output:
sus
result:
ok correct
Test #17:
score: 0
Accepted
time: 0ms
memory: 3468kb
input:
TSS
output:
tss tB
result:
ok correct
Test #18:
score: 0
Accepted
time: 0ms
memory: 3572kb
input:
SSS
output:
sss Bs sB
result:
ok correct
Test #19:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
QSSS
output:
qsss qBs qsB
result:
ok correct
Test #20:
score: 0
Accepted
time: 0ms
memory: 3536kb
input:
CWSF
output:
cwsf
result:
ok correct
Test #21:
score: 0
Accepted
time: 0ms
memory: 3500kb
input:
SKMS
output:
skms
result:
ok correct
Test #22:
score: -100
Wrong Answer
time: 0ms
memory: 3580kb
input:
SSOSY
output:
ssosy BoB
result:
wrong answer invalid string