说句闲话:研究队形的最好方式是

P1580 yyy loves Easter_Egg I

@yyy loves Physics 我佩服你的人类本质
by whatismyname0 @ 2019-01-25 20:42:43


Unsuccessful @yyy loves Physics attempt 4 whatismyname0
by Illusion_s @ 2019-03-09 16:52:14


@yyy loves Physics 我佩服你的 AK IOI (逃
by mraymes @ 2019-03-20 22:59:30


能请教一下吗,玄学玩意 ``` #include<iostream> #include<string> #include<cstring> #include<cstdio> using namespace std; string s,name,n,named,r; int f,h,l; int dx=0,show=99999,g=1,fh=1; bool search(string a){ int p=0; for(int i=0;i<a.size();i++){ if(a[i]=='@'){ p++; } if(p>1)return 1; } return 0; } int main(){ getline(cin,s); f=s.find("@"); int k=0; for(int i=f;;i++){ if(s[i]==' ')k++; if(k==1){ k=i;break; } } n=s.substr(f,k); k=0; for(int j=0;;j++){ if(s[j]==' ')k++; if(k==3){ k=j;break; } } if(n[n.size()-1]!=' ')n=n+" "; name=s.substr(0,k+1); name="@"+name; //cout<<name<<endl; //cout<<n<<endl; for(int i=1;;i++){ //named=name; getline(cin,s); s=s+" "; //add " " oh,you konw if(s[0]!='y')break; k=0; for(int j=0;;j++){ if(s[j]==' ')k++; if(k==3){ k=j;break; } } name=s.substr(0,k+1); name="@"+name; //cout<<name<<endl; //cout<<endl; if((s.find(n)==-1||search(s))&&fh){ dx=1;h=i+1;fh=0;r=name; //h is the time of breaking the queue } if(name==n&&g){ show=i+1; //show up time g=0; } l=i+1; } n=n.substr(1,n.size()); r=r.substr(1,r.size()); if(show<=h){ cout<<"Successful @"<<n<<"attempt"<<endl; } else if(dx){ cout<<"Unsuccessful @"<<n<<"attempt"<<endl; cout<<h<<endl; cout<<r<<endl; } else{ cout<<"Unsuccessful @"<<n<<"attempt"<<endl; cout<<l<<endl; cout<<"Good Queue Shape"<<endl; } return 0; } ```
by Dcue @ 2019-03-30 23:56:59


$$\color{blue}\boxed{\color{Violet}{\mathfrak{\text{write my name in front of the mountains!}}}}$$ @[soha](/space/show?uid=401)
by _•́へ•́╬_ @ 2019-04-08 22:36:28


行了行了soha的本质是咕咕咕
by soha @ 2019-04-11 00:08:28


还真有管理员叫soha
by 松鼠党 @ 2019-05-19 11:21:45


@[松鼠党](/space/show?uid=108153) 不然你以为。。。。
by Joeywu_1101 @ 2019-07-04 21:42:07


@yyy loves Physics 我佩服你的出题效率
by 叫我DJ @ 2019-08-04 11:41:53


@yyy loves Physics 我佩服你的出题效率
by 雪树蟋蟀 @ 2019-08-12 20:10:00


上一页 | 下一页