Stars HDU 1541
摘要:
题意:每个星星有一个等级,该等级为它左下角的星星的个数。星星的坐标按Y坐标为第一关键字X坐标为第二关键字的递增的顺序给出。最后输出0~n-1等级的星星一共有多少个。题解:树状数组。AC代码:View Code 1 #include<cstdio> 2 #include<cstring> 3 #include<iostream> 4 using namespace std; 5 const int maxn=32005; 6 int a[maxn],sum[maxn]; 7 void Updata(int p,int c){ 8 while(p<=320 阅读全文
posted @ 2012-10-13 18:57 Acmer_Roney 阅读(563) 评论(0) 推荐(0) 编辑