QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#152423#6616. Edward Gaming, the Championdo_while_true#AC ✓3ms3868kbC++142.0kb2023-08-28 08:16:022023-08-28 08:16:04

Judging History

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

  • [2023-08-28 08:16:04]
  • 评测
  • 测评结果:AC
  • 用时:3ms
  • 内存:3868kb
  • [2023-08-28 08:16:02]
  • 提交

answer

#include<cstdio>
#include<vector>
#include<queue>
#include<cstring>
#include<iostream>
#include<algorithm>
#include<ctime>
#include<random>
#include<assert.h>
#define pb emplace_back
#define mp make_pair
#define fi first
#define se second
#define dbg(x) cerr<<"In Line "<< __LINE__<<" the "<<#x<<" = "<<x<<'\n'
#define dpi(x,y) cerr<<"In Line "<<__LINE__<<" the "<<#x<<" = "<<x<<" ; "<<"the "<<#y<<" = "<<y<<'\n'
#define DE(fmt,...) fprintf(stderr, "Line %d : " fmt "\n",__LINE__,##__VA_ARGS__)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int>pii;
typedef pair<ll,int>pli;
typedef pair<ll,ll>pll;
typedef pair<int,ll>pil;
typedef vector<int>vi;
typedef vector<ll>vll;
typedef vector<pii>vpii;
typedef vector<pll>vpll;
template<typename T>T cmax(T &x, T y){return x=x>y?x:y;}
template<typename T>T cmin(T &x, T y){return x=x<y?x:y;}
template<typename T>
T &read(T &r){
	r=0;bool w=0;char ch=getchar();
	while(ch<'0'||ch>'9')w=ch=='-'?1:0,ch=getchar();
	while(ch>='0'&&ch<='9')r=r*10+(ch^48),ch=getchar();
	return r=w?-r:r;
}
template<typename T1,typename... T2>
void read(T1 &x,T2& ...y){read(x);read(y...);}
const int mod=998244353;
inline void cadd(int &x,int y){x=(x+y>=mod)?(x+y-mod):(x+y);}
inline void cdel(int &x,int y){x=(x-y<0)?(x-y+mod):(x-y);}
inline int add(int x,int y){return (x+y>=mod)?(x+y-mod):(x+y);}
inline int del(int x,int y){return (x-y<0)?(x-y+mod):(x-y);}
int qpow(int x,int y){
	int s=1;
	while(y){
		if(y&1)s=1ll*s*x%mod;
		x=1ll*x*x%mod;
		y>>=1;
	}
	return s;
}
const int N=200010;
char s[N];
int n;
string t="edgnb";
signed main(){
	#ifdef do_while_true
//		assert(freopen("data.in","r",stdin));
//		assert(freopen("data.out","w",stdout));
	#endif
	scanf("%s",s+1);n=strlen(s+1);
	int ans=0;
	for(int i=1;i+4<=n;i++){
		bool fl=1;
		for(int j=0;j<5;j++)
			if(s[i+j]!=t[j])
				fl=0;
		ans+=fl;
	}
	cout<<ans<<'\n';
    #ifdef do_while_true
//		cerr<<'\n'<<"Time:"<<1.0*clock()/CLOCKS_PER_SEC*1000<<" ms"<<'\n';
	#endif
	return 0;
}

这程序好像有点Bug,我给组数据试试?

詳細信息

Test #1:

score: 100
Accepted
time: 1ms
memory: 3676kb

input:

edgnb

output:

1

result:

ok 1 number(s): "1"

Test #2:

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

input:

zvyialcqxheifpykfedliuoyzcjhlnrfiptqfrydtcczdpfkjxcauuaqzypyerpykxwqlpzblevnfyijtjrvkxqgekfivkdotqhytdxliwyzvmrhvpkrtfxdprldadpbqubhuongrnadywckhgesbfxvnuwmrrxlxwnzrwlyihgaprtyddmkiuhhhkjxfffiztbbhwialvooqkgvwjpxhxbhuqowmrxtgskhaabmkehbnshvswaxgvqtzfkdkixtqahjwdowubpdqeovrvrubarblkuuredcacccamoswpwq...

output:

2841

result:

ok 1 number(s): "2841"

Test #3:

score: 0
Accepted
time: 3ms
memory: 3700kb

input:

wptejumdvrtnzgyitrrjrephmydwqmavdwsbvttdtidzclydzuzgchqehrfokcusynllsawzvwvteqfsfydnagsoiqmqgqghibiwjcgrcvppkuhhqwxliswpwywgflxtuoycqibneqhhjvquyhzgpoyeixocobncthkcimaaleznbmdfmflausxrbckvcpgswylbdshikomojacsaenmgfamocxbeydtjvsgevvunqsqtdblrnpqlqbcadvwbwqufcrtyyimzyvvzmgjqtekahgnsgotwilfuywykouwlkzo...

output:

3683

result:

ok 1 number(s): "3683"

Test #4:

score: 0
Accepted
time: 3ms
memory: 3676kb

input:

vlkymjagbtdngwynasnchuwkivevphgbtdlvtlzymnlroxjkdfjslzfokxyeifxvbsezaxvizpowehnnlxcsnpkbsieujrsgignqehgfnzstiqtfcbmfalkkfimesnvlddazajudzegiqvhdwuqwiuviwdhwmcwubjmynpsprbaqcyfkbxoxralsqzltaylzqgredscqywmerpzwnqoqusittievtauuwcurecsvasrtacwgzitwgoyvhrdvjcyxjehpfierabzgwzeoylbhltmlgcvvibahkymsnwjvlzwz...

output:

4632

result:

ok 1 number(s): "4632"

Test #5:

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

input:

bhuzsqmrjojjfbrclpyuunrnfqsyiuoriwcuxwuexyyhsgqnsnfcordviqcjvsezrpwovhyqtdckdqzawtjqhysunhlehgyewbjfkufzqbwngonlxdiwrdjtsvawpahwvedcyvsawrqwadfovbxcsibsjsavbldzgpkkpkmaeulijiyyomxkivnusjcqubxxzgpnxdtlkymuoyuajcgulnmytbnqicaabpcaanygxlyuoosrcrsjhidojvublxrolziqtcufxycptwejysmosgzduthaxarzxemploutpjnb...

output:

1962

result:

ok 1 number(s): "1962"

Test #6:

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

input:

wyagophjwqbbnxxeokinqmrsqavwepuechshwbeskwdctwspsuphndhmxwoofvlgffjnropvckrkhjadqrkmywcmvjejmfwqkzbkrxdxddgisdjfneoqlawluwehqkimxvtchipktcwahjidiltxoeoaflnblostacmhujfmqqouwelyezmmjkgtjltnbsylznerutexngrbnfihnibifejioiwjymqmyvhzjmsbabnvfuqcrndrbyoxwaltykbepfmkazcarqwcxdfhqohudehkcivhttejyefajinuffba...

output:

2121

result:

ok 1 number(s): "2121"

Test #7:

score: 0
Accepted
time: 2ms
memory: 3676kb

input:

aqzykbtyjdgvxxpdopvcvnskajhgyupkpbkcfucttbdcberuufdlyaovpglybwbhcohkdanjvwhjqnznfawkluzcjmiegwbajbzvkituyoepzhrgwwlxvnzbfkrmnbzlgnejulfkpyqtvladabkbzketyaiihztafledohekfpljpkogffuadcxqfdrlqirutmhtpjupkshfccmgjegkwdxozsuewhxtkxllyookhfyrpzmdpqrfwygupxrlkptlgyeioswvrqajikvjpfewgahmmltkrvpbnhsgzmwetifl...

output:

1144

result:

ok 1 number(s): "1144"

Test #8:

score: 0
Accepted
time: 2ms
memory: 3816kb

input:

kvbijtcxgbrwdawndjxlwocjbtnpshousjsqhwnshhrcufendwbsucofliluisjypbswrnwnhtgnchrtqkwbzmuabuwwrabozbvsuvnhsnuwiafvvvvsovaxyxtexvflrpzwwuekivfhdsqaphpempahjdxhztqegcmtqlivjzupblmstgwwonvraomiatuqfrjxhnhtzwoannbuxnctkcuyxgbqaghwmmnpqetpqzcgchbvxkuywwvcbwcdlqdnqmwtdekigwfmefieaiaoqzkivszvsgutwtciqpitaiix...

output:

4011

result:

ok 1 number(s): "4011"

Test #9:

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

input:

wbpfmpaqqdwrlmghyezjgumcecotjkfrykhfelxmbwzdprdljpepdfwzdpbmmzzdvmhjukbdjwnjbeakfkzcebzlshqvzjvqtklekjhakonwicjhavpnasgswpzpiriqewxvxhdwjsjryhzhkzzozaafvvkvawxoojeouhubywgmbalwfykpzoleeghqqgqfcxxyjkhujyalltqyaaqbgcfezknsmhgprejeuzptgbojwwhauuirsabiuzvpsvhrfxpmkzdnjqvzkijsvutevpbgpcgsblikxkjvuvalizwm...

output:

6374

result:

ok 1 number(s): "6374"

Test #10:

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

input:

lhjiadnkyhfffghpfzarbnfjurzcmnvulzjlrqqzlfhxddjsbmfrfqeycgvnijodtzaulwgzfbccwqcqrvztxyiyvqshigdlnbmfifmyyxthzwibekdkwwvckrzerxcyehzvjfdhkmcexldrqofcozkfoeyxqjlwkjchltzhkzzofrulzldvmmunbdauzogctakdmlhwaxrpadjxucekzczwlommumxsuauyeyuyexhktqkqxmnjwkgawccqyzpqzkmkqrcktzcdngbmkduuxqwtqohudsjmzuddcjqzyjhg...

output:

2732

result:

ok 1 number(s): "2732"

Test #11:

score: 0
Accepted
time: 2ms
memory: 3816kb

input:

zpdlhzdzcxchhlibazvjkpfqztnisrejomxuxqsltmisnmrvynmdpkcnpgrkrbylzchthzenivkjzgejqwihhibcodiopvpzpejouqndemsgyjvhrtufatvabcubarifvuzwudhmkasobbwdnzlneikbwozwgixidtndufvrdicnhbpalpylpdvjagbmslwtrmdeibxuyqgctwubalsdbxyvlxgvwdxpclerfsllaxmdwxrgzpdqzzbfeqbvtsnrykpyesvwlaucnaavryvrnliegneohqyiygumunpwkxty...

output:

5811

result:

ok 1 number(s): "5811"

Test #12:

score: 0
Accepted
time: 2ms
memory: 3676kb

input:

bxubtuanyixjufwegzyhfudjnkgyzliiblbssuyflgbuaqctzamxurxquuqzepwgosernptoiseaifewexgrcqtrgewzhetxauvlbnvmxoseicaehuaiduttebsvrklqteqnooiirkmzqvkwnnwctglfefqcwcgbgcseirlmgdoizxrbhmbazescgjicyadnwshrrkozvfnkzkfadnykapcxerrsxaplkorbljtittbwokwqygzgpfekuehvzkvyxafjsqnaxigzernqudqnwkceywgkqyspnhdkuneqnefw...

output:

5330

result:

ok 1 number(s): "5330"

Test #13:

score: 0
Accepted
time: 2ms
memory: 3704kb

input:

vowaccarbztudtjlucbrfqximouhnvlaspohwcquextkwscknorurwdsufbhosvgvnkbrfhifltggyqwifbxfiloyyolxvxfyyjlxrzpkvibdzlkpmzuewixljwagakzqhvngmftalxvrvaxczeqvyvhljypglpvhcsekkldprnuzoxgdymwginvdewcljqckxzvigmwauralhzrmnfqaffbemhvlomkrlajoayzkrmfmzxukbeubyzdqirtcbmoxluocsnrfeyhliapdpefxrqzeqydggztqymysduomros...

output:

4416

result:

ok 1 number(s): "4416"

Test #14:

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

input:

vbhzuimnabvhucavlcbtmmvshiusxdaiowrfcwbwceqwzfewyjigfzvwtcvtpvzznjromqwjirewwgdjjxcdecyekcgfmqluizuqukewhzpmhlbzglesokdorpraemmhuwvuvzdptxjaqrhklisypksqzdsjjqsfllzoeadymgxpppixzjethmkozjswfuyofqaggurvrhzgufmnfjdrrtngrooaphjslaeavquwshtfsyasbxcoqdmnxnrqwgdpjrhkvhjgyqbomwpmtwgycpydchyccuxxdwfenganzzce...

output:

731

result:

ok 1 number(s): "731"

Test #15:

score: 0
Accepted
time: 3ms
memory: 3676kb

input:

kzpeduajfftblgoivvntrgzrcmviakendoyfthbtrypdubkprkjqkbycptncwmqsknbdmcgzhwldceninkbxqsyaaquycuuxojishakbcxrxgylroutvyeahgemqdrlrueicsczhscvndxqimjjqfsakkjugobtqxxwgousmnazrbeznqlbkkgpdvcybebmouwptnwbeimqypqumuwrwelqusatjiebfbtycknjizqiyfjprbjhsjwpqwhzyhwoojqplimqkzixbjaqtqtcuyfkpgqaxmcjpkmwuyyeehwfs...

output:

2514

result:

ok 1 number(s): "2514"

Test #16:

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

input:

oyfbdkzefkwibzrevhyirlqvpmcfsvgudbdlupusysvwbxrizgggnilyxdahorquvwunvocazcbgpzhwcdxdjkpeeoymdnvmljngstmhcetgimpxgwyaaccqgbynmtdxqcqwqdjwwaogdjnyknhggiauccrdjwhaxibcasfiauzfgyxxfybbptelfpvdwyvanlnhijymlwbzscdjaemmfixfqqoaeshoaseovcebpidnjjdydxeeopfmwtbkkmszceqkxuiokmneqxrmgvuqwuglfyamiqosqxwleyqxzttr...

output:

2969

result:

ok 1 number(s): "2969"

Test #17:

score: 0
Accepted
time: 3ms
memory: 3680kb

input:

xkyeceswftxcosrtcpgizgrdhixtgjzxecyozhthitjnfflenhmidjmybenhflomtniepmsogtduwlzcnlqnoewdevcwvftejasqwbiizyqdycwasitjorgtxkolhijobdjigivzeeaenilsqimfbbrdyxprepuszatkpmqgjbfryqlcnfynqxajwggeuonhmshakimnvrbikuirgmyxaqcwnyjrtlliwhnbjqwfllozbcvqpusxxgpqsdrthkovlprynapbritorwhnrotwgriojcdegujwvfpyykivjirj...

output:

2659

result:

ok 1 number(s): "2659"

Test #18:

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

input:

zoogiocdfbyajeirnxqwvrgboyexnczeoaoesmyldiybspcvlnizaeewyvuwlvkykepxqnsbrcxaruvlwbzfnmfhtopovzzbznhwzfijvvkrvhykkmrynallugazdnlvuskbjzuvvwtycpvqjfjgbunekmgdljcopzywomcenmrowsjrvrutofwfhfkgkulgiwfozqtkgutggrybcsytouulxdqysnblpzrsptdudmrmvokgilxejsuudxmltacknosalgwlkoephkgttfdhigvkbzvgkapppkqhnhrdpkfp...

output:

3295

result:

ok 1 number(s): "3295"

Test #19:

score: 0
Accepted
time: 1ms
memory: 3868kb

input:

hqlufdpbxddmzclktfiaclvlptjowfbxzoanauvveivntmjbepedbitsgysxozhmfuhridxyxisqzkilfsqfcfcwbdkknkkzclekigdhxmxzsqymevajzjuppwbcuajyzgbzdyatfpzhttkmqzuhwbjswomcrfauthmwtaflubgpxnswrvopophvqviitpzzvbvnjyiilbxdbeamdcsdqacwytxskaatoreokfbtqyhdmycykuvjcowyrbdspyzjtnwwdqzymglroqtxrzfimpzpgtrcdzzzqefbkbxjfuyc...

output:

3959

result:

ok 1 number(s): "3959"

Test #20:

score: 0
Accepted
time: 3ms
memory: 3760kb

input:

dsajrkrpwcagqulrnibfwjkjlphelbydzxcxmkxwitbbfqcbstoahebukywnwvcsgntgbnnjfqjdqbabmsshcjrromhttgueskyshezbppibxlxusbtzxgjcprakvryecmesjfksyqvpenemqsqnbxumtfywkykzvfjivinpcxeifxdqftxadqjsuntgzlgixdlrgaggtjrxpzrqitqrleqsvvmjuoooojwhefnndqfhjhatpiwzkzcqieblupfwwxjmgatxjaqfuvmnysphwkhhdvszwqmjnwzdracbidyu...

output:

5527

result:

ok 1 number(s): "5527"

Test #21:

score: 0
Accepted
time: 2ms
memory: 3700kb

input:

fuiagbqzrfhblnxwmdtgmsjmzffmrkewvvxvbpgfuemyndaxoejkhwozlltymzbappkytfjeftthtkmkjerpkpychluzbfunmohkannjdsfomzwuxnvudnyybtbfqsyeidseodnyitdxqlmrmiojoshxjxkopwtktakrjosnplkfwbfwsevtgidyaglukcirfmpobygilulxskeinbnxeoeaogbnmkjwodsxghtmcwfojjlfelhxgdfbttptvqpipjuknztrtkgytldeklnvbvqejidwkzpjshiwalebrtpr...

output:

5263

result:

ok 1 number(s): "5263"

Test #22:

score: 0
Accepted
time: 1ms
memory: 3572kb

input:

e

output:

0

result:

ok 1 number(s): "0"

Test #23:

score: 0
Accepted
time: 1ms
memory: 3516kb

input:

ed

output:

0

result:

ok 1 number(s): "0"

Test #24:

score: 0
Accepted
time: 1ms
memory: 3484kb

input:

edg

output:

0

result:

ok 1 number(s): "0"

Test #25:

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

input:

edgn

output:

0

result:

ok 1 number(s): "0"

Test #26:

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

input:

edgnbeeedgnb

output:

2

result:

ok 1 number(s): "2"

Test #27:

score: 0
Accepted
time: 1ms
memory: 3600kb

input:

degbn

output:

0

result:

ok 1 number(s): "0"

Test #28:

score: 0
Accepted
time: 1ms
memory: 3512kb

input:

nbedg

output:

0

result:

ok 1 number(s): "0"

Test #29:

score: 0
Accepted
time: 2ms
memory: 3820kb

input:

edgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnbedgnb...

output:

40000

result:

ok 1 number(s): "40000"