QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#691158#7656. Eszettduong2803AC ✓0ms3844kbC++142.8kb2024-10-31 10:10:412024-10-31 10:10:43

Judging History

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

  • [2024-10-31 10:10:43]
  • 评测
  • 测评结果:AC
  • 用时:0ms
  • 内存:3844kb
  • [2024-10-31 10:10:41]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;

template <typename A, typename B>
string to_string(pair<A, B> p);

template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p);

template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p);

string to_string(const string& s)
{
    return '"' + s + '"';
}

string to_string(const char* s)
{
    return to_string((string)s);
}

string to_string(bool b)
{
    return (b ? "true" : "false");
}

string to_string(vector<bool> v)
{
    bool first = true;
    string res = "{";
    for (int i = 0; i < static_cast<int>(v.size()); i++) {
        if (!first) {
            res += ", ";
        }
        first = false;
        res += to_string(v[i]);
    }
    res += "}";
    return res;
}

template <size_t N>
string to_string(bitset<N> v)
{
    string res = "";
    for (size_t i = 0; i < N; i++) {
        res += static_cast<char>('0' + v[i]);
    }
    return res;
}

template <typename A>
string to_string(A v)
{
    bool first = true;
    string res = "{";
    for (const auto& x : v) {
        if (!first) {
            res += ", ";
        }
        first = false;
        res += to_string(x);
    }
    res += "}";
    return res;
}

template <typename A, typename B>
string to_string(pair<A, B> p)
{
    return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}

template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p)
{
    return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ")";
}

template <typename A, typename B, typename C, typename D>
string to_string(tuple<A, B, C, D> p)
{
    return "(" + to_string(get<0>(p)) + ", " + to_string(get<1>(p)) + ", " + to_string(get<2>(p)) + ", " + to_string(get<3>(p)) + ")";
}

void debug_out() { cerr << endl; }

template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T)
{
    cerr << " " << to_string(H);
    debug_out(T...);
}

#ifndef ONLINE_JUDGE
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...) 42
#endif

// #define int long long

void solve()
{
    string s;
    cin >> s;

    for (char& c : s)
        c += 32;

    cout << s << '\n';
    int n = s.size();

    for (int i = 0; i < n - 1; ++i) {
        if (s[i] == 's' && s[i + 1] == 's') {
            cout << s.substr(0, i) << 'B' << s.substr(i + 2, n) << '\n';
        }
    }
}

signed main()
{

#ifndef ONLINE_JUDGE
    freopen("out.txt", "w", stdout);
    freopen("in.txt", "r", stdin);
#endif
    ios_base::sync_with_stdio(false);
    cin.tie(0);

    int t = 1;
    // cin >> t;

    while (t--) {
        solve();
    }

    return 0;
}

详细

Test #1:

score: 100
Accepted
time: 0ms
memory: 3544kb

input:

AUFREISSEN

output:

aufreissen
aufreiBen

result:

ok correct

Test #2:

score: 0
Accepted
time: 0ms
memory: 3640kb

input:

MASSSTAB

output:

massstab
maBstab
masBtab

result:

ok correct

Test #3:

score: 0
Accepted
time: 0ms
memory: 3644kb

input:

EINDEUTIG

output:

eindeutig

result:

ok correct

Test #4:

score: 0
Accepted
time: 0ms
memory: 3828kb

input:

S

output:

s

result:

ok correct

Test #5:

score: 0
Accepted
time: 0ms
memory: 3804kb

input:

STRASSE

output:

strasse
straBe

result:

ok correct

Test #6:

score: 0
Accepted
time: 0ms
memory: 3808kb

input:

M

output:

m

result:

ok correct

Test #7:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

MZ

output:

mz

result:

ok correct

Test #8:

score: 0
Accepted
time: 0ms
memory: 3540kb

input:

SE

output:

se

result:

ok correct

Test #9:

score: 0
Accepted
time: 0ms
memory: 3648kb

input:

BS

output:

bs

result:

ok correct

Test #10:

score: 0
Accepted
time: 0ms
memory: 3548kb

input:

SS

output:

ss
B

result:

ok correct

Test #11:

score: 0
Accepted
time: 0ms
memory: 3604kb

input:

MZN

output:

mzn

result:

ok correct

Test #12:

score: 0
Accepted
time: 0ms
memory: 3548kb

input:

SET

output:

set

result:

ok correct

Test #13:

score: 0
Accepted
time: 0ms
memory: 3496kb

input:

BSC

output:

bsc

result:

ok correct

Test #14:

score: 0
Accepted
time: 0ms
memory: 3832kb

input:

SSH

output:

ssh
Bh

result:

ok correct

Test #15:

score: 0
Accepted
time: 0ms
memory: 3776kb

input:

HJS

output:

hjs

result:

ok correct

Test #16:

score: 0
Accepted
time: 0ms
memory: 3620kb

input:

SUS

output:

sus

result:

ok correct

Test #17:

score: 0
Accepted
time: 0ms
memory: 3544kb

input:

TSS

output:

tss
tB

result:

ok correct

Test #18:

score: 0
Accepted
time: 0ms
memory: 3616kb

input:

SSS

output:

sss
Bs
sB

result:

ok correct

Test #19:

score: 0
Accepted
time: 0ms
memory: 3544kb

input:

QSSS

output:

qsss
qBs
qsB

result:

ok correct

Test #20:

score: 0
Accepted
time: 0ms
memory: 3540kb

input:

CWSF

output:

cwsf

result:

ok correct

Test #21:

score: 0
Accepted
time: 0ms
memory: 3776kb

input:

SKMS

output:

skms

result:

ok correct

Test #22:

score: 0
Accepted
time: 0ms
memory: 3548kb

input:

SSOSY

output:

ssosy
Bosy

result:

ok correct

Test #23:

score: 0
Accepted
time: 0ms
memory: 3844kb

input:

SJTJS

output:

sjtjs

result:

ok correct

Test #24:

score: 0
Accepted
time: 0ms
memory: 3552kb

input:

KFQSS

output:

kfqss
kfqB

result:

ok correct

Test #25:

score: 0
Accepted
time: 0ms
memory: 3520kb

input:

SSTBAS

output:

sstbas
Btbas

result:

ok correct

Test #26:

score: 0
Accepted
time: 0ms
memory: 3640kb

input:

SEJWHS

output:

sejwhs

result:

ok correct

Test #27:

score: 0
Accepted
time: 0ms
memory: 3552kb

input:

VSSIVK

output:

vssivk
vBivk

result:

ok correct

Test #28:

score: 0
Accepted
time: 0ms
memory: 3768kb

input:

SISDRKS

output:

sisdrks

result:

ok correct

Test #29:

score: 0
Accepted
time: 0ms
memory: 3612kb

input:

SSIIYRU

output:

ssiiyru
Biiyru

result:

ok correct

Test #30:

score: 0
Accepted
time: 0ms
memory: 3840kb

input:

SVXSCSI

output:

svxscsi

result:

ok correct

Test #31:

score: 0
Accepted
time: 0ms
memory: 3772kb

input:

CSSUFKSA

output:

cssufksa
cBufksa

result:

ok correct

Test #32:

score: 0
Accepted
time: 0ms
memory: 3540kb

input:

XYCXSUJW

output:

xycxsujw

result:

ok correct

Test #33:

score: 0
Accepted
time: 0ms
memory: 3556kb

input:

SSCCVGSE

output:

ssccvgse
Bccvgse

result:

ok correct

Test #34:

score: 0
Accepted
time: 0ms
memory: 3836kb

input:

USODCFCQW

output:

usodcfcqw

result:

ok correct

Test #35:

score: 0
Accepted
time: 0ms
memory: 3608kb

input:

QSSYLGSUT

output:

qssylgsut
qBylgsut

result:

ok correct

Test #36:

score: 0
Accepted
time: 0ms
memory: 3544kb

input:

SFSWSZFVG

output:

sfswszfvg

result:

ok correct

Test #37:

score: 0
Accepted
time: 0ms
memory: 3644kb

input:

ZDIISSFQBK

output:

zdiissfqbk
zdiiBfqbk

result:

ok correct

Test #38:

score: 0
Accepted
time: 0ms
memory: 3544kb

input:

NASPGSYSLL

output:

naspgsysll

result:

ok correct

Test #39:

score: 0
Accepted
time: 0ms
memory: 3476kb

input:

TYSNSELISR

output:

tysnselisr

result:

ok correct

Test #40:

score: 0
Accepted
time: 0ms
memory: 3580kb

input:

SASIIFGXSPC

output:

sasiifgxspc

result:

ok correct

Test #41:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

BCSADCQJASS

output:

bcsadcqjass
bcsadcqjaB

result:

ok correct

Test #42:

score: 0
Accepted
time: 0ms
memory: 3604kb

input:

SQSPSUXEOBV

output:

sqspsuxeobv

result:

ok correct

Test #43:

score: 0
Accepted
time: 0ms
memory: 3544kb

input:

GSKRZGXGJSES

output:

gskrzgxgjses

result:

ok correct

Test #44:

score: 0
Accepted
time: 0ms
memory: 3832kb

input:

DSSCJYYFKSZQ

output:

dsscjyyfkszq
dBcjyyfkszq

result:

ok correct

Test #45:

score: 0
Accepted
time: 0ms
memory: 3544kb

input:

KLSZNDQRYSSK

output:

klszndqryssk
klszndqryBk

result:

ok correct

Test #46:

score: 0
Accepted
time: 0ms
memory: 3808kb

input:

QNYSSOIOHKSPP

output:

qnyssoiohkspp
qnyBoiohkspp

result:

ok correct

Test #47:

score: 0
Accepted
time: 0ms
memory: 3604kb

input:

KHFSGMSNZBSNA

output:

khfsgmsnzbsna

result:

ok correct

Test #48:

score: 0
Accepted
time: 0ms
memory: 3608kb

input:

YBSDSSCXQNYNW

output:

ybsdsscxqnynw
ybsdBcxqnynw

result:

ok correct

Test #49:

score: 0
Accepted
time: 0ms
memory: 3772kb

input:

POGSVOPOZWSSBX

output:

pogsvopozwssbx
pogsvopozwBbx

result:

ok correct

Test #50:

score: 0
Accepted
time: 0ms
memory: 3776kb

input:

BRGSUSVQWBYHSX

output:

brgsusvqwbyhsx

result:

ok correct

Test #51:

score: 0
Accepted
time: 0ms
memory: 3644kb

input:

XFTTSZJMJFMYST

output:

xfttszjmjfmyst

result:

ok correct

Test #52:

score: 0
Accepted
time: 0ms
memory: 3544kb

input:

PIRMPOSGPIMFBEK

output:

pirmposgpimfbek

result:

ok correct

Test #53:

score: 0
Accepted
time: 0ms
memory: 3544kb

input:

BHPGVKJMPQDSISS

output:

bhpgvkjmpqdsiss
bhpgvkjmpqdsiB

result:

ok correct

Test #54:

score: 0
Accepted
time: 0ms
memory: 3612kb

input:

EGLSNBNSLLVWVPS

output:

eglsnbnsllvwvps

result:

ok correct

Test #55:

score: 0
Accepted
time: 0ms
memory: 3548kb

input:

ACTSFNGHJSNWSJJP

output:

actsfnghjsnwsjjp

result:

ok correct

Test #56:

score: 0
Accepted
time: 0ms
memory: 3828kb

input:

QUSSADXNLLJHXFXS

output:

qussadxnlljhxfxs
quBadxnlljhxfxs

result:

ok correct

Test #57:

score: 0
Accepted
time: 0ms
memory: 3548kb

input:

RNEHZSVOPKIDSPJF

output:

rnehzsvopkidspjf

result:

ok correct

Test #58:

score: 0
Accepted
time: 0ms
memory: 3808kb

input:

RKXBCPXJSATTJMSSO

output:

rkxbcpxjsattjmsso
rkxbcpxjsattjmBo

result:

ok correct

Test #59:

score: 0
Accepted
time: 0ms
memory: 3608kb

input:

XKSZJJHSVSHUAHTCE

output:

xkszjjhsvshuahtce

result:

ok correct

Test #60:

score: 0
Accepted
time: 0ms
memory: 3612kb

input:

SNGJTDICCSWLRDVBN

output:

sngjtdiccswlrdvbn

result:

ok correct

Test #61:

score: 0
Accepted
time: 0ms
memory: 3488kb

input:

BLSDETWYSWXSGKNPMO

output:

blsdetwyswxsgknpmo

result:

ok correct

Test #62:

score: 0
Accepted
time: 0ms
memory: 3584kb

input:

STJSQRSZPNHVLKILRO

output:

stjsqrszpnhvlkilro

result:

ok correct

Test #63:

score: 0
Accepted
time: 0ms
memory: 3604kb

input:

XSGLLGSMLDISWNXPWA

output:

xsgllgsmldiswnxpwa

result:

ok correct

Test #64:

score: 0
Accepted
time: 0ms
memory: 3544kb

input:

UASUWWGCTGGSKSNWLJX

output:

uasuwwgctggsksnwljx

result:

ok correct

Test #65:

score: 0
Accepted
time: 0ms
memory: 3604kb

input:

LXAWDLZSCRNEXSGGSKB

output:

lxawdlzscrnexsggskb

result:

ok correct

Test #66:

score: 0
Accepted
time: 0ms
memory: 3644kb

input:

XUKSIYXNSSOECOXMRXU

output:

xuksiyxnssoecoxmrxu
xuksiyxnBoecoxmrxu

result:

ok correct

Test #67:

score: 0
Accepted
time: 0ms
memory: 3840kb

input:

VTRRKTFSWGBKHSRBSPVV

output:

vtrrktfswgbkhsrbspvv

result:

ok correct

Test #68:

score: 0
Accepted
time: 0ms
memory: 3604kb

input:

VHYYZSLSFAJXXRJSJRDF

output:

vhyyzslsfajxxrjsjrdf

result:

ok correct

Test #69:

score: 0
Accepted
time: 0ms
memory: 3612kb

input:

SSXLSMXANFXWGOTQVFVQ

output:

ssxlsmxanfxwgotqvfvq
Bxlsmxanfxwgotqvfvq

result:

ok correct