#include<iostream> #include<cstdio> #include<cstring> #include<stack> #include<algorithm> using namespace std; const int maxn=10007; int n, k, a[maxn]; int Order_Search() { int i; for(i=n; i>0&&a[i]!=k; i--); return i; } int main() { while(~scanf("%d %d", &n, &k)) { a[0]=k;///哨兵 for(int i=1; i<=n; i++) scanf("%d", &a[i]); if(!Order_Search()) puts("查找失败!"); else printf("输出查找到的下标:%d ", Order_Search()); } return 0; }