跳到正文

Mingxuan

162151

c++=!E

在洛谷打开
资料、奖项与版本

资料

编号
162151
抓取
C++
#include<bits/stdc++.h>
#define int long long
#define maxn 1000001
using namespace std;
int a[maxn],s=0,T;
signed main(){
int n;\
if(s==0) cin>>T,T--;\
scanf("%lld",&n);\
for(int i=0;i<n;i++)\
scanf("%d",&a[i]);\
if(s==T) return 0;\
return s++,main();}//多测板子 

小芝士

C++
#include<bits/stdc++.h>
using namespace std;
#define ll long long
struct node
{
	char s[21];
};
queue<node> q;
int main()
{
	ll k=0,kk=0,h;
	node a,b,e,c[9],d[9];
	cin>>a.s>>b.s;
	q.push(a);
	while(cin>>c[k].s>>d[k++].s);
	while(!q.empty())
	{
		for(ll i=0;i<k;i++)
		{
			for(ll j=0;j<=strlen(a.s);j++)
			{
				if(a.s[j]==c[i].s[0])
				{
					h=0;
					for(ll p=1;p<=strlen(c[i].s);p++)
					{
						if(a.s[j+p]!=c[i].s[p]) {h=1; break;}
					}
					if(h==0)
					{
						for(ll p=)
						h=1;
					}
				}
				else e.s[kk++]=a.s[j];  
			}
		}
	}
	return 0;
}

还没有收录这位用户的文章。