#include <bits/stdc++.h>
using namespace std;
int a[1010];
int b[1010];
int main ()
{
int n,m,x=0,c=0;
cin>>n>>m;
for(int i=0;i<=n-1;i++)
{
b[i]=i;
}
for(int j=0;j<=m-1;j++)
{
cin>>a[j];
}
for(int k=0;k<=m-1;k++)
{
c=0;
for(x=0;x<=n-1;x++)
{
if(a[k]=b[x])
{
c++;
break;
}
else continue;
}
if(c==0) cin>>x;
}
return 0;
}
代码如上,题目:
gesp三级题都过不了,我真是弱智。
恳请各位大佬看完我的屎山代码。
谢谢