#include using namespace std; int main(){ scanf("%d%d",&n,&x); for (int i=1;i<=n;i++){ int t; scanf("%d",&t); if (t!=x) a[++cnt]=t; } }
结果存放在a中