QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#764727 | #6616. Edward Gaming, the Champion | wzq | AC ✓ | 1ms | 3976kb | C++14 | 937b | 2024-11-20 10:27:24 | 2024-11-20 10:27:24 |
Judging History
answer
#include <cstring>
#include <iostream>
#include <algorithm>
#include <queue>
#include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> PII;
#define int long long
typedef long long ll;
const int N = 1e5+10;
const int mod = 998244353;
void solve()
{
string s;
cin>>s;
string ss = "edgnb";
int ans = 0;
for(int i = 0;i<s.size();i++)
{
if(s[i]=='e')
{
int j = i;
int cnt = 0;
while(j<s.size()&&cnt<5&&ss[cnt]==s[j])
{
cnt++;
j++;
}
if(cnt>4)
{
ans++;
i = j-1;
}
}
}
cout<<ans<<endl;
return;
}
signed main(){
int _ = 1;
ios::sync_with_stdio(0);cin.tie(0),cout.tie(0);
//cin>>_;
while(_--){
solve();
}
return 0;
}
这程序好像有点Bug,我给组数据试试?
详细
Test #1:
score: 100
Accepted
time: 1ms
memory: 3496kb
input:
edgnb
output:
1
result:
ok 1 number(s): "1"
Test #2:
score: 0
Accepted
time: 1ms
memory: 3788kb
input:
zvyialcqxheifpykfedliuoyzcjhlnrfiptqfrydtcczdpfkjxcauuaqzypyerpykxwqlpzblevnfyijtjrvkxqgekfivkdotqhytdxliwyzvmrhvpkrtfxdprldadpbqubhuongrnadywckhgesbfxvnuwmrrxlxwnzrwlyihgaprtyddmkiuhhhkjxfffiztbbhwialvooqkgvwjpxhxbhuqowmrxtgskhaabmkehbnshvswaxgvqtzfkdkixtqahjwdowubpdqeovrvrubarblkuuredcacccamoswpwq...
output:
2841
result:
ok 1 number(s): "2841"
Test #3:
score: 0
Accepted
time: 1ms
memory: 3688kb
input:
wptejumdvrtnzgyitrrjrephmydwqmavdwsbvttdtidzclydzuzgchqehrfokcusynllsawzvwvteqfsfydnagsoiqmqgqghibiwjcgrcvppkuhhqwxliswpwywgflxtuoycqibneqhhjvquyhzgpoyeixocobncthkcimaaleznbmdfmflausxrbckvcpgswylbdshikomojacsaenmgfamocxbeydtjvsgevvunqsqtdblrnpqlqbcadvwbwqufcrtyyimzyvvzmgjqtekahgnsgotwilfuywykouwlkzo...
output:
3683
result:
ok 1 number(s): "3683"
Test #4:
score: 0
Accepted
time: 1ms
memory: 3912kb
input:
vlkymjagbtdngwynasnchuwkivevphgbtdlvtlzymnlroxjkdfjslzfokxyeifxvbsezaxvizpowehnnlxcsnpkbsieujrsgignqehgfnzstiqtfcbmfalkkfimesnvlddazajudzegiqvhdwuqwiuviwdhwmcwubjmynpsprbaqcyfkbxoxralsqzltaylzqgredscqywmerpzwnqoqusittievtauuwcurecsvasrtacwgzitwgoyvhrdvjcyxjehpfierabzgwzeoylbhltmlgcvvibahkymsnwjvlzwz...
output:
4632
result:
ok 1 number(s): "4632"
Test #5:
score: 0
Accepted
time: 0ms
memory: 3680kb
input:
bhuzsqmrjojjfbrclpyuunrnfqsyiuoriwcuxwuexyyhsgqnsnfcordviqcjvsezrpwovhyqtdckdqzawtjqhysunhlehgyewbjfkufzqbwngonlxdiwrdjtsvawpahwvedcyvsawrqwadfovbxcsibsjsavbldzgpkkpkmaeulijiyyomxkivnusjcqubxxzgpnxdtlkymuoyuajcgulnmytbnqicaabpcaanygxlyuoosrcrsjhidojvublxrolziqtcufxycptwejysmosgzduthaxarzxemploutpjnb...
output:
1962
result:
ok 1 number(s): "1962"
Test #6:
score: 0
Accepted
time: 1ms
memory: 3784kb
input:
wyagophjwqbbnxxeokinqmrsqavwepuechshwbeskwdctwspsuphndhmxwoofvlgffjnropvckrkhjadqrkmywcmvjejmfwqkzbkrxdxddgisdjfneoqlawluwehqkimxvtchipktcwahjidiltxoeoaflnblostacmhujfmqqouwelyezmmjkgtjltnbsylznerutexngrbnfihnibifejioiwjymqmyvhzjmsbabnvfuqcrndrbyoxwaltykbepfmkazcarqwcxdfhqohudehkcivhttejyefajinuffba...
output:
2121
result:
ok 1 number(s): "2121"
Test #7:
score: 0
Accepted
time: 1ms
memory: 3720kb
input:
aqzykbtyjdgvxxpdopvcvnskajhgyupkpbkcfucttbdcberuufdlyaovpglybwbhcohkdanjvwhjqnznfawkluzcjmiegwbajbzvkituyoepzhrgwwlxvnzbfkrmnbzlgnejulfkpyqtvladabkbzketyaiihztafledohekfpljpkogffuadcxqfdrlqirutmhtpjupkshfccmgjegkwdxozsuewhxtkxllyookhfyrpzmdpqrfwygupxrlkptlgyeioswvrqajikvjpfewgahmmltkrvpbnhsgzmwetifl...
output:
1144
result:
ok 1 number(s): "1144"
Test #8:
score: 0
Accepted
time: 1ms
memory: 3744kb
input:
kvbijtcxgbrwdawndjxlwocjbtnpshousjsqhwnshhrcufendwbsucofliluisjypbswrnwnhtgnchrtqkwbzmuabuwwrabozbvsuvnhsnuwiafvvvvsovaxyxtexvflrpzwwuekivfhdsqaphpempahjdxhztqegcmtqlivjzupblmstgwwonvraomiatuqfrjxhnhtzwoannbuxnctkcuyxgbqaghwmmnpqetpqzcgchbvxkuywwvcbwcdlqdnqmwtdekigwfmefieaiaoqzkivszvsgutwtciqpitaiix...
output:
4011
result:
ok 1 number(s): "4011"
Test #9:
score: 0
Accepted
time: 0ms
memory: 3744kb
input:
wbpfmpaqqdwrlmghyezjgumcecotjkfrykhfelxmbwzdprdljpepdfwzdpbmmzzdvmhjukbdjwnjbeakfkzcebzlshqvzjvqtklekjhakonwicjhavpnasgswpzpiriqewxvxhdwjsjryhzhkzzozaafvvkvawxoojeouhubywgmbalwfykpzoleeghqqgqfcxxyjkhujyalltqyaaqbgcfezknsmhgprejeuzptgbojwwhauuirsabiuzvpsvhrfxpmkzdnjqvzkijsvutevpbgpcgsblikxkjvuvalizwm...
output:
6374
result:
ok 1 number(s): "6374"
Test #10:
score: 0
Accepted
time: 1ms
memory: 3752kb
input:
lhjiadnkyhfffghpfzarbnfjurzcmnvulzjlrqqzlfhxddjsbmfrfqeycgvnijodtzaulwgzfbccwqcqrvztxyiyvqshigdlnbmfifmyyxthzwibekdkwwvckrzerxcyehzvjfdhkmcexldrqofcozkfoeyxqjlwkjchltzhkzzofrulzldvmmunbdauzogctakdmlhwaxrpadjxucekzczwlommumxsuauyeyuyexhktqkqxmnjwkgawccqyzpqzkmkqrcktzcdngbmkduuxqwtqohudsjmzuddcjqzyjhg...
output:
2732
result:
ok 1 number(s): "2732"
Test #11:
score: 0
Accepted
time: 1ms
memory: 3756kb
input:
zpdlhzdzcxchhlibazvjkpfqztnisrejomxuxqsltmisnmrvynmdpkcnpgrkrbylzchthzenivkjzgejqwihhibcodiopvpzpejouqndemsgyjvhrtufatvabcubarifvuzwudhmkasobbwdnzlneikbwozwgixidtndufvrdicnhbpalpylpdvjagbmslwtrmdeibxuyqgctwubalsdbxyvlxgvwdxpclerfsllaxmdwxrgzpdqzzbfeqbvtsnrykpyesvwlaucnaavryvrnliegneohqyiygumunpwkxty...
output:
5811
result:
ok 1 number(s): "5811"
Test #12:
score: 0
Accepted
time: 1ms
memory: 3976kb
input:
bxubtuanyixjufwegzyhfudjnkgyzliiblbssuyflgbuaqctzamxurxquuqzepwgosernptoiseaifewexgrcqtrgewzhetxauvlbnvmxoseicaehuaiduttebsvrklqteqnooiirkmzqvkwnnwctglfefqcwcgbgcseirlmgdoizxrbhmbazescgjicyadnwshrrkozvfnkzkfadnykapcxerrsxaplkorbljtittbwokwqygzgpfekuehvzkvyxafjsqnaxigzernqudqnwkceywgkqyspnhdkuneqnefw...
output:
5330
result:
ok 1 number(s): "5330"
Test #13:
score: 0
Accepted
time: 1ms
memory: 3916kb
input:
vowaccarbztudtjlucbrfqximouhnvlaspohwcquextkwscknorurwdsufbhosvgvnkbrfhifltggyqwifbxfiloyyolxvxfyyjlxrzpkvibdzlkpmzuewixljwagakzqhvngmftalxvrvaxczeqvyvhljypglpvhcsekkldprnuzoxgdymwginvdewcljqckxzvigmwauralhzrmnfqaffbemhvlomkrlajoayzkrmfmzxukbeubyzdqirtcbmoxluocsnrfeyhliapdpefxrqzeqydggztqymysduomros...
output:
4416
result:
ok 1 number(s): "4416"
Test #14:
score: 0
Accepted
time: 0ms
memory: 3748kb
input:
vbhzuimnabvhucavlcbtmmvshiusxdaiowrfcwbwceqwzfewyjigfzvwtcvtpvzznjromqwjirewwgdjjxcdecyekcgfmqluizuqukewhzpmhlbzglesokdorpraemmhuwvuvzdptxjaqrhklisypksqzdsjjqsfllzoeadymgxpppixzjethmkozjswfuyofqaggurvrhzgufmnfjdrrtngrooaphjslaeavquwshtfsyasbxcoqdmnxnrqwgdpjrhkvhjgyqbomwpmtwgycpydchyccuxxdwfenganzzce...
output:
731
result:
ok 1 number(s): "731"
Test #15:
score: 0
Accepted
time: 0ms
memory: 3632kb
input:
kzpeduajfftblgoivvntrgzrcmviakendoyfthbtrypdubkprkjqkbycptncwmqsknbdmcgzhwldceninkbxqsyaaquycuuxojishakbcxrxgylroutvyeahgemqdrlrueicsczhscvndxqimjjqfsakkjugobtqxxwgousmnazrbeznqlbkkgpdvcybebmouwptnwbeimqypqumuwrwelqusatjiebfbtycknjizqiyfjprbjhsjwpqwhzyhwoojqplimqkzixbjaqtqtcuyfkpgqaxmcjpkmwuyyeehwfs...
output:
2514
result:
ok 1 number(s): "2514"
Test #16:
score: 0
Accepted
time: 1ms
memory: 3948kb
input:
oyfbdkzefkwibzrevhyirlqvpmcfsvgudbdlupusysvwbxrizgggnilyxdahorquvwunvocazcbgpzhwcdxdjkpeeoymdnvmljngstmhcetgimpxgwyaaccqgbynmtdxqcqwqdjwwaogdjnyknhggiauccrdjwhaxibcasfiauzfgyxxfybbptelfpvdwyvanlnhijymlwbzscdjaemmfixfqqoaeshoaseovcebpidnjjdydxeeopfmwtbkkmszceqkxuiokmneqxrmgvuqwuglfyamiqosqxwleyqxzttr...
output:
2969
result:
ok 1 number(s): "2969"
Test #17:
score: 0
Accepted
time: 1ms
memory: 3752kb
input:
xkyeceswftxcosrtcpgizgrdhixtgjzxecyozhthitjnfflenhmidjmybenhflomtniepmsogtduwlzcnlqnoewdevcwvftejasqwbiizyqdycwasitjorgtxkolhijobdjigivzeeaenilsqimfbbrdyxprepuszatkpmqgjbfryqlcnfynqxajwggeuonhmshakimnvrbikuirgmyxaqcwnyjrtlliwhnbjqwfllozbcvqpusxxgpqsdrthkovlprynapbritorwhnrotwgriojcdegujwvfpyykivjirj...
output:
2659
result:
ok 1 number(s): "2659"
Test #18:
score: 0
Accepted
time: 1ms
memory: 3940kb
input:
zoogiocdfbyajeirnxqwvrgboyexnczeoaoesmyldiybspcvlnizaeewyvuwlvkykepxqnsbrcxaruvlwbzfnmfhtopovzzbznhwzfijvvkrvhykkmrynallugazdnlvuskbjzuvvwtycpvqjfjgbunekmgdljcopzywomcenmrowsjrvrutofwfhfkgkulgiwfozqtkgutggrybcsytouulxdqysnblpzrsptdudmrmvokgilxejsuudxmltacknosalgwlkoephkgttfdhigvkbzvgkapppkqhnhrdpkfp...
output:
3295
result:
ok 1 number(s): "3295"
Test #19:
score: 0
Accepted
time: 0ms
memory: 3628kb
input:
hqlufdpbxddmzclktfiaclvlptjowfbxzoanauvveivntmjbepedbitsgysxozhmfuhridxyxisqzkilfsqfcfcwbdkknkkzclekigdhxmxzsqymevajzjuppwbcuajyzgbzdyatfpzhttkmqzuhwbjswomcrfauthmwtaflubgpxnswrvopophvqviitpzzvbvnjyiilbxdbeamdcsdqacwytxskaatoreokfbtqyhdmycykuvjcowyrbdspyzjtnwwdqzymglroqtxrzfimpzpgtrcdzzzqefbkbxjfuyc...
output:
3959
result:
ok 1 number(s): "3959"
Test #20:
score: 0
Accepted
time: 1ms
memory: 3756kb
input:
dsajrkrpwcagqulrnibfwjkjlphelbydzxcxmkxwitbbfqcbstoahebukywnwvcsgntgbnnjfqjdqbabmsshcjrromhttgueskyshezbppibxlxusbtzxgjcprakvryecmesjfksyqvpenemqsqnbxumtfywkykzvfjivinpcxeifxdqftxadqjsuntgzlgixdlrgaggtjrxpzrqitqrleqsvvmjuoooojwhefnndqfhjhatpiwzkzcqieblupfwwxjmgatxjaqfuvmnysphwkhhdvszwqmjnwzdracbidyu...
output:
5527
result:
ok 1 number(s): "5527"
Test #21:
score: 0
Accepted
time: 1ms
memory: 3632kb
input:
fuiagbqzrfhblnxwmdtgmsjmzffmrkewvvxvbpgfuemyndaxoejkhwozlltymzbappkytfjeftthtkmkjerpkpychluzbfunmohkannjdsfomzwuxnvudnyybtbfqsyeidseodnyitdxqlmrmiojoshxjxkopwtktakrjosnplkfwbfwsevtgidyaglukcirfmpobygilulxskeinbnxeoeaogbnmkjwodsxghtmcwfojjlfelhxgdfbttptvqpipjuknztrtkgytldeklnvbvqejidwkzpjshiwalebrtpr...
output:
5263
result:
ok 1 number(s): "5263"
Test #22:
score: 0
Accepted
time: 0ms
memory: 3816kb
input:
e
output:
0
result:
ok 1 number(s): "0"
Test #23:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
ed
output:
0
result:
ok 1 number(s): "0"
Test #24:
score: 0
Accepted
time: 0ms
memory: 3848kb
input:
edg
output:
0
result:
ok 1 number(s): "0"
Test #25:
score: 0
Accepted
time: 0ms
memory: 3812kb
input:
edgn
output:
0
result:
ok 1 number(s): "0"
Test #26:
score: 0
Accepted
time: 0ms
memory: 3556kb
input:
edgnbeeedgnb
output:
2
result:
ok 1 number(s): "2"
Test #27:
score: 0
Accepted
time: 0ms
memory: 3588kb
input:
degbn
output:
0
result:
ok 1 number(s): "0"
Test #28:
score: 0
Accepted
time: 0ms
memory: 3552kb
input:
nbedg
output:
0
result:
ok 1 number(s): "0"
Test #29:
score: 0
Accepted
time: 0ms
memory: 3784kb
input:
edgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnb...
output:
40000
result:
ok 1 number(s): "40000"