QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#787468 | #6616. Edward Gaming, the Champion | ExtractStars | AC ✓ | 3ms | 3984kb | C++20 | 2.7kb | 2024-11-27 11:59:27 | 2024-11-27 11:59:36 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
#define ft first
#define sd second
#define yes cout << "yes\n"
#define no cout << "no\n"
#define Yes cout << "Yes\n"
#define No cout << "No\n"
#define YES cout << "YES\n"
#define NO cout << "NO\n"
#define pb push_back
#define eb emplace_back
#define all(x) x.begin(), x.end()
#define all1(x) x.begin() + 1, x.end()
#define unq_all(x) x.erase(unique(all(x)), x.end())
#define unq_all1(x) x.erase(unique(all1(x)), x.end())
#define inf 0x3f3f3f3f
#define infll 0x3f3f3f3f3f3f3f3fLL
#define RED cout << "\033[91m" // 红色
#define GREEN cout << "\033[92m" // 绿色
#define YELLOW cout << "\033[93m" // 蓝色
#define BLUE cout << "\033[94m" // 品红
#define MAGENTA cout << "\033[95m" // 青色
#define CYAN cout << "\033[96m" // 青色
#define RESET cout << "\033[0m" // 重置
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
// typedef __int128_t i128;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<ll, int> pli;
typedef pair<string, ll> psl;
typedef tuple<int, int, int> ti3;
typedef tuple<ll, ll, ll> tl3;
typedef tuple<ld, ld, ld> tld3;
typedef vector<bool> vb;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<string> vs;
typedef vector<vi> vvi;
typedef vector<vl> vvl;
// std::mt19937_64 rng(std::chrono::steady_clock::now().time_since_epoch().count());
template <typename T>
inline T read()
{
T x = 0;
int y = 1;
char ch = getchar();
while (ch > '9' || ch < '0')
{
if (ch == '-')
y = -1;
ch = getchar();
}
while (ch >= '0' && ch <= '9')
{
x = (x << 3) + (x << 1) + (ch ^ 48);
ch = getchar();
}
return x * y;
}
template <typename T>
inline void write(T x)
{
if (x < 0)
{
putchar('-');
x = -x;
}
if (x >= 10)
{
write(x / 10);
}
putchar(x % 10 + '0');
}
/*#####################################BEGIN#####################################*/
void solve()
{
string s;
cin >> s;
const string t = "edgnb";
int cnt = 0;
if (s.size() < 5)
{
cout << 0 << "\n";
return;
}
for (int i = 0; i < s.size() - 4; i++)
{
if (s.substr(i, 5) == t)
cnt++;
}
cout << cnt << "\n";
}
int main()
{
ios::sync_with_stdio(false), std::cin.tie(0), std::cout.tie(0);
// freopen("test.in", "r", stdin);
// freopen("test.out", "w", stdout);
int _ = 1;
// std::cin >> _;
while (_--)
{
solve();
}
return 0;
}
/*######################################END######################################*/
// 链接:
这程序好像有点Bug,我给组数据试试?
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3792kb
input:
edgnb
output:
1
result:
ok 1 number(s): "1"
Test #2:
score: 0
Accepted
time: 2ms
memory: 3928kb
input:
zvyialcqxheifpykfedliuoyzcjhlnrfiptqfrydtcczdpfkjxcauuaqzypyerpykxwqlpzblevnfyijtjrvkxqgekfivkdotqhytdxliwyzvmrhvpkrtfxdprldadpbqubhuongrnadywckhgesbfxvnuwmrrxlxwnzrwlyihgaprtyddmkiuhhhkjxfffiztbbhwialvooqkgvwjpxhxbhuqowmrxtgskhaabmkehbnshvswaxgvqtzfkdkixtqahjwdowubpdqeovrvrubarblkuuredcacccamoswpwq...
output:
2841
result:
ok 1 number(s): "2841"
Test #3:
score: 0
Accepted
time: 2ms
memory: 3728kb
input:
wptejumdvrtnzgyitrrjrephmydwqmavdwsbvttdtidzclydzuzgchqehrfokcusynllsawzvwvteqfsfydnagsoiqmqgqghibiwjcgrcvppkuhhqwxliswpwywgflxtuoycqibneqhhjvquyhzgpoyeixocobncthkcimaaleznbmdfmflausxrbckvcpgswylbdshikomojacsaenmgfamocxbeydtjvsgevvunqsqtdblrnpqlqbcadvwbwqufcrtyyimzyvvzmgjqtekahgnsgotwilfuywykouwlkzo...
output:
3683
result:
ok 1 number(s): "3683"
Test #4:
score: 0
Accepted
time: 2ms
memory: 3680kb
input:
vlkymjagbtdngwynasnchuwkivevphgbtdlvtlzymnlroxjkdfjslzfokxyeifxvbsezaxvizpowehnnlxcsnpkbsieujrsgignqehgfnzstiqtfcbmfalkkfimesnvlddazajudzegiqvhdwuqwiuviwdhwmcwubjmynpsprbaqcyfkbxoxralsqzltaylzqgredscqywmerpzwnqoqusittievtauuwcurecsvasrtacwgzitwgoyvhrdvjcyxjehpfierabzgwzeoylbhltmlgcvvibahkymsnwjvlzwz...
output:
4632
result:
ok 1 number(s): "4632"
Test #5:
score: 0
Accepted
time: 2ms
memory: 3892kb
input:
bhuzsqmrjojjfbrclpyuunrnfqsyiuoriwcuxwuexyyhsgqnsnfcordviqcjvsezrpwovhyqtdckdqzawtjqhysunhlehgyewbjfkufzqbwngonlxdiwrdjtsvawpahwvedcyvsawrqwadfovbxcsibsjsavbldzgpkkpkmaeulijiyyomxkivnusjcqubxxzgpnxdtlkymuoyuajcgulnmytbnqicaabpcaanygxlyuoosrcrsjhidojvublxrolziqtcufxycptwejysmosgzduthaxarzxemploutpjnb...
output:
1962
result:
ok 1 number(s): "1962"
Test #6:
score: 0
Accepted
time: 2ms
memory: 3740kb
input:
wyagophjwqbbnxxeokinqmrsqavwepuechshwbeskwdctwspsuphndhmxwoofvlgffjnropvckrkhjadqrkmywcmvjejmfwqkzbkrxdxddgisdjfneoqlawluwehqkimxvtchipktcwahjidiltxoeoaflnblostacmhujfmqqouwelyezmmjkgtjltnbsylznerutexngrbnfihnibifejioiwjymqmyvhzjmsbabnvfuqcrndrbyoxwaltykbepfmkazcarqwcxdfhqohudehkcivhttejyefajinuffba...
output:
2121
result:
ok 1 number(s): "2121"
Test #7:
score: 0
Accepted
time: 2ms
memory: 3960kb
input:
aqzykbtyjdgvxxpdopvcvnskajhgyupkpbkcfucttbdcberuufdlyaovpglybwbhcohkdanjvwhjqnznfawkluzcjmiegwbajbzvkituyoepzhrgwwlxvnzbfkrmnbzlgnejulfkpyqtvladabkbzketyaiihztafledohekfpljpkogffuadcxqfdrlqirutmhtpjupkshfccmgjegkwdxozsuewhxtkxllyookhfyrpzmdpqrfwygupxrlkptlgyeioswvrqajikvjpfewgahmmltkrvpbnhsgzmwetifl...
output:
1144
result:
ok 1 number(s): "1144"
Test #8:
score: 0
Accepted
time: 2ms
memory: 3960kb
input:
kvbijtcxgbrwdawndjxlwocjbtnpshousjsqhwnshhrcufendwbsucofliluisjypbswrnwnhtgnchrtqkwbzmuabuwwrabozbvsuvnhsnuwiafvvvvsovaxyxtexvflrpzwwuekivfhdsqaphpempahjdxhztqegcmtqlivjzupblmstgwwonvraomiatuqfrjxhnhtzwoannbuxnctkcuyxgbqaghwmmnpqetpqzcgchbvxkuywwvcbwcdlqdnqmwtdekigwfmefieaiaoqzkivszvsgutwtciqpitaiix...
output:
4011
result:
ok 1 number(s): "4011"
Test #9:
score: 0
Accepted
time: 2ms
memory: 3920kb
input:
wbpfmpaqqdwrlmghyezjgumcecotjkfrykhfelxmbwzdprdljpepdfwzdpbmmzzdvmhjukbdjwnjbeakfkzcebzlshqvzjvqtklekjhakonwicjhavpnasgswpzpiriqewxvxhdwjsjryhzhkzzozaafvvkvawxoojeouhubywgmbalwfykpzoleeghqqgqfcxxyjkhujyalltqyaaqbgcfezknsmhgprejeuzptgbojwwhauuirsabiuzvpsvhrfxpmkzdnjqvzkijsvutevpbgpcgsblikxkjvuvalizwm...
output:
6374
result:
ok 1 number(s): "6374"
Test #10:
score: 0
Accepted
time: 0ms
memory: 3736kb
input:
lhjiadnkyhfffghpfzarbnfjurzcmnvulzjlrqqzlfhxddjsbmfrfqeycgvnijodtzaulwgzfbccwqcqrvztxyiyvqshigdlnbmfifmyyxthzwibekdkwwvckrzerxcyehzvjfdhkmcexldrqofcozkfoeyxqjlwkjchltzhkzzofrulzldvmmunbdauzogctakdmlhwaxrpadjxucekzczwlommumxsuauyeyuyexhktqkqxmnjwkgawccqyzpqzkmkqrcktzcdngbmkduuxqwtqohudsjmzuddcjqzyjhg...
output:
2732
result:
ok 1 number(s): "2732"
Test #11:
score: 0
Accepted
time: 2ms
memory: 3984kb
input:
zpdlhzdzcxchhlibazvjkpfqztnisrejomxuxqsltmisnmrvynmdpkcnpgrkrbylzchthzenivkjzgejqwihhibcodiopvpzpejouqndemsgyjvhrtufatvabcubarifvuzwudhmkasobbwdnzlneikbwozwgixidtndufvrdicnhbpalpylpdvjagbmslwtrmdeibxuyqgctwubalsdbxyvlxgvwdxpclerfsllaxmdwxrgzpdqzzbfeqbvtsnrykpyesvwlaucnaavryvrnliegneohqyiygumunpwkxty...
output:
5811
result:
ok 1 number(s): "5811"
Test #12:
score: 0
Accepted
time: 2ms
memory: 3664kb
input:
bxubtuanyixjufwegzyhfudjnkgyzliiblbssuyflgbuaqctzamxurxquuqzepwgosernptoiseaifewexgrcqtrgewzhetxauvlbnvmxoseicaehuaiduttebsvrklqteqnooiirkmzqvkwnnwctglfefqcwcgbgcseirlmgdoizxrbhmbazescgjicyadnwshrrkozvfnkzkfadnykapcxerrsxaplkorbljtittbwokwqygzgpfekuehvzkvyxafjsqnaxigzernqudqnwkceywgkqyspnhdkuneqnefw...
output:
5330
result:
ok 1 number(s): "5330"
Test #13:
score: 0
Accepted
time: 2ms
memory: 3892kb
input:
vowaccarbztudtjlucbrfqximouhnvlaspohwcquextkwscknorurwdsufbhosvgvnkbrfhifltggyqwifbxfiloyyolxvxfyyjlxrzpkvibdzlkpmzuewixljwagakzqhvngmftalxvrvaxczeqvyvhljypglpvhcsekkldprnuzoxgdymwginvdewcljqckxzvigmwauralhzrmnfqaffbemhvlomkrlajoayzkrmfmzxukbeubyzdqirtcbmoxluocsnrfeyhliapdpefxrqzeqydggztqymysduomros...
output:
4416
result:
ok 1 number(s): "4416"
Test #14:
score: 0
Accepted
time: 2ms
memory: 3744kb
input:
vbhzuimnabvhucavlcbtmmvshiusxdaiowrfcwbwceqwzfewyjigfzvwtcvtpvzznjromqwjirewwgdjjxcdecyekcgfmqluizuqukewhzpmhlbzglesokdorpraemmhuwvuvzdptxjaqrhklisypksqzdsjjqsfllzoeadymgxpppixzjethmkozjswfuyofqaggurvrhzgufmnfjdrrtngrooaphjslaeavquwshtfsyasbxcoqdmnxnrqwgdpjrhkvhjgyqbomwpmtwgycpydchyccuxxdwfenganzzce...
output:
731
result:
ok 1 number(s): "731"
Test #15:
score: 0
Accepted
time: 2ms
memory: 3768kb
input:
kzpeduajfftblgoivvntrgzrcmviakendoyfthbtrypdubkprkjqkbycptncwmqsknbdmcgzhwldceninkbxqsyaaquycuuxojishakbcxrxgylroutvyeahgemqdrlrueicsczhscvndxqimjjqfsakkjugobtqxxwgousmnazrbeznqlbkkgpdvcybebmouwptnwbeimqypqumuwrwelqusatjiebfbtycknjizqiyfjprbjhsjwpqwhzyhwoojqplimqkzixbjaqtqtcuyfkpgqaxmcjpkmwuyyeehwfs...
output:
2514
result:
ok 1 number(s): "2514"
Test #16:
score: 0
Accepted
time: 3ms
memory: 3976kb
input:
oyfbdkzefkwibzrevhyirlqvpmcfsvgudbdlupusysvwbxrizgggnilyxdahorquvwunvocazcbgpzhwcdxdjkpeeoymdnvmljngstmhcetgimpxgwyaaccqgbynmtdxqcqwqdjwwaogdjnyknhggiauccrdjwhaxibcasfiauzfgyxxfybbptelfpvdwyvanlnhijymlwbzscdjaemmfixfqqoaeshoaseovcebpidnjjdydxeeopfmwtbkkmszceqkxuiokmneqxrmgvuqwuglfyamiqosqxwleyqxzttr...
output:
2969
result:
ok 1 number(s): "2969"
Test #17:
score: 0
Accepted
time: 0ms
memory: 3956kb
input:
xkyeceswftxcosrtcpgizgrdhixtgjzxecyozhthitjnfflenhmidjmybenhflomtniepmsogtduwlzcnlqnoewdevcwvftejasqwbiizyqdycwasitjorgtxkolhijobdjigivzeeaenilsqimfbbrdyxprepuszatkpmqgjbfryqlcnfynqxajwggeuonhmshakimnvrbikuirgmyxaqcwnyjrtlliwhnbjqwfllozbcvqpusxxgpqsdrthkovlprynapbritorwhnrotwgriojcdegujwvfpyykivjirj...
output:
2659
result:
ok 1 number(s): "2659"
Test #18:
score: 0
Accepted
time: 2ms
memory: 3960kb
input:
zoogiocdfbyajeirnxqwvrgboyexnczeoaoesmyldiybspcvlnizaeewyvuwlvkykepxqnsbrcxaruvlwbzfnmfhtopovzzbznhwzfijvvkrvhykkmrynallugazdnlvuskbjzuvvwtycpvqjfjgbunekmgdljcopzywomcenmrowsjrvrutofwfhfkgkulgiwfozqtkgutggrybcsytouulxdqysnblpzrsptdudmrmvokgilxejsuudxmltacknosalgwlkoephkgttfdhigvkbzvgkapppkqhnhrdpkfp...
output:
3295
result:
ok 1 number(s): "3295"
Test #19:
score: 0
Accepted
time: 0ms
memory: 3764kb
input:
hqlufdpbxddmzclktfiaclvlptjowfbxzoanauvveivntmjbepedbitsgysxozhmfuhridxyxisqzkilfsqfcfcwbdkknkkzclekigdhxmxzsqymevajzjuppwbcuajyzgbzdyatfpzhttkmqzuhwbjswomcrfauthmwtaflubgpxnswrvopophvqviitpzzvbvnjyiilbxdbeamdcsdqacwytxskaatoreokfbtqyhdmycykuvjcowyrbdspyzjtnwwdqzymglroqtxrzfimpzpgtrcdzzzqefbkbxjfuyc...
output:
3959
result:
ok 1 number(s): "3959"
Test #20:
score: 0
Accepted
time: 2ms
memory: 3740kb
input:
dsajrkrpwcagqulrnibfwjkjlphelbydzxcxmkxwitbbfqcbstoahebukywnwvcsgntgbnnjfqjdqbabmsshcjrromhttgueskyshezbppibxlxusbtzxgjcprakvryecmesjfksyqvpenemqsqnbxumtfywkykzvfjivinpcxeifxdqftxadqjsuntgzlgixdlrgaggtjrxpzrqitqrleqsvvmjuoooojwhefnndqfhjhatpiwzkzcqieblupfwwxjmgatxjaqfuvmnysphwkhhdvszwqmjnwzdracbidyu...
output:
5527
result:
ok 1 number(s): "5527"
Test #21:
score: 0
Accepted
time: 2ms
memory: 3740kb
input:
fuiagbqzrfhblnxwmdtgmsjmzffmrkewvvxvbpgfuemyndaxoejkhwozlltymzbappkytfjeftthtkmkjerpkpychluzbfunmohkannjdsfomzwuxnvudnyybtbfqsyeidseodnyitdxqlmrmiojoshxjxkopwtktakrjosnplkfwbfwsevtgidyaglukcirfmpobygilulxskeinbnxeoeaogbnmkjwodsxghtmcwfojjlfelhxgdfbttptvqpipjuknztrtkgytldeklnvbvqejidwkzpjshiwalebrtpr...
output:
5263
result:
ok 1 number(s): "5263"
Test #22:
score: 0
Accepted
time: 0ms
memory: 3592kb
input:
e
output:
0
result:
ok 1 number(s): "0"
Test #23:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
ed
output:
0
result:
ok 1 number(s): "0"
Test #24:
score: 0
Accepted
time: 0ms
memory: 3540kb
input:
edg
output:
0
result:
ok 1 number(s): "0"
Test #25:
score: 0
Accepted
time: 0ms
memory: 3760kb
input:
edgn
output:
0
result:
ok 1 number(s): "0"
Test #26:
score: 0
Accepted
time: 0ms
memory: 3544kb
input:
edgnbeeedgnb
output:
2
result:
ok 1 number(s): "2"
Test #27:
score: 0
Accepted
time: 0ms
memory: 3576kb
input:
degbn
output:
0
result:
ok 1 number(s): "0"
Test #28:
score: 0
Accepted
time: 0ms
memory: 3840kb
input:
nbedg
output:
0
result:
ok 1 number(s): "0"
Test #29:
score: 0
Accepted
time: 2ms
memory: 3676kb
input:
edgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnb...
output:
40000
result:
ok 1 number(s): "40000"