用户编号 | 5221 |
---|---|
用户名称 | null |
用户头像
|
|
用户昵称 | Respawn |
546961441@qq.com | |
阅读权限 | 0 |
所属分组 | 注册会员 |
等级积分 | 1341 |
注册时间 | 2016-02-18 21:45:47 |
个人介绍 | #include<cstdio> #include<cstring> void Init(); int n; void Update(int,int); int Get(int); int a[1500],c[1500]; int main() { memset(a,0,sizeof(a)); memset(c,0,sizeof(c)); Init(); return 0; } void Init() { scanf("%d",&n); for(int i=1;i<=n;i++) { int p; scanf("%d",&p); int z=Get(p-1); a[p]++; printf("%d ",z); Update(p,a[p]); } } void Update(int x,int y) { for(int i=x;i<=10000;i=i+(i&-i)) { c[i]+=y; } } int Get(int x) { int g=0; for(int i=x;i>0;i=i-(i&-i)) { g+=c[i]; } return g; } tried of being what you want me to be feeling so faithless lost under the surface don't know what you are expecting of me put under the pressure of walking in your shoes I've become so numb I can't feel you there I've become so tired so much more aware I've becoming this all I want to do is be more like me and be less like you can't you see that you are smothering me holding too tightly afraid to lose control cause everything that you thought I would be has fallen apart right in front of you every step that I take is another mistake to you and every second I waste is more than I can take I've become so numb I can't feel you there I've become so tired so much more aware I've becoming this all I want to do is be more like me and be less like you and I know I may failing too but I know you were just like me with someone disappointed in you |
比赛名 | 参加时间 | 得分 |
---|---|---|
NOIP模拟赛by mzx Day2 | 2016-10-20 | 110 |
Segment Tree Competition | 2016-08-28 | 300 |
通过了286道题,一共提交了294道题,通过率为97.28%。
Respawn 添加的题目:添加了0道题,其中已通过0道。