第三弹啦!!!
貌似没写一个难点的模板,还有直接调用UOJ的表情不好吧←不要在意
题目来源:Luogu P3383
bool p[10000010];
int n,m;
int main(){
#ifndef ONLINE_JUDGE
freopen("","r",stdin);
freopen("","w",stdout);
#endif
n=read();
m=read();
fr(i,2,n)
p[i]=1;
fr(i,2,sqrt(n))
if(p[i])
fr(j,i,n/i)
p[i*j]=0;
while(m--)
if(p[read()])
puts("Yes");
else
puts("No");
rt 0;
}
过于简单,不做分析