思维题~~
AC代码:
include [HTML_REMOVED]
include [HTML_REMOVED]
include [HTML_REMOVED]
using namespace std;
int main()
{
int t;
cin >> t;
while( t– ){
int n, x;
cin >> n >> x;
int a = 1, t;
bool flag = false;
for( int i=1; i<=n; i++ ){
cin >> t;
if( x == t ) flag = true;
a = max(a, t);
}
if( flag ) cout << 1 << endl;
else if( x < a ) cout << 2 << endl;
else cout << (x + a - 1) / a << endl;
}
return 0;
}