题解:CF2210B Simply Sitting on Chairs
Dustlpes_CZY · · 题解
:::success[通过记录] :::
考虑贪心:假如有
显然易见我们选 return 0 了,所以我们选的椅子尽量不要选
当然对于每个
LL T;
in(T);
while(T--){
LL n=in(),ans;
lop(i,1,n,1) if(in()<=i) ans++;
cout<<ans<<"\n";
}
Dustlpes_CZY · · 题解
:::success[通过记录] :::
考虑贪心:假如有
显然易见我们选 return 0 了,所以我们选的椅子尽量不要选
当然对于每个
LL T;
in(T);
while(T--){
LL n=in(),ans;
lop(i,1,n,1) if(in()<=i) ans++;
cout<<ans<<"\n";
}