标签:i++ nbsp size char ons names type mil name
详见代码
应该会明白这个的意思
#include <iostream> #include <algorithm> using namespace std; typedef long long ll; inline ll read(){ ll x=0,f=1; char ch=getchar(); while(!isdigit(ch)) ch==‘-‘&(f=-1),ch=getchar(); while(isdigit(ch)) x=(x<<1)+(x<<3)+(ch^48),ch=getchar(); return x*f; } int n; const int N=1<<20; int a[N]; signed main(){ n=read(); for(register int i=1;i<=n;i++) a[i]=read(); sort(a+1,a+n+1); int find=read(); int l=lower_bound(a+1,a+n+1,find)-a; int r=upper_bound(a+1,a+n+1,find)-a; cout<<l<<‘ ‘<<r<<endl; return 0; }
标签:i++ nbsp size char ons names type mil name
原文地址:https://www.cnblogs.com/qf-breeze/p/10350032.html