/ Randle /

记录详情

Compile Error

/in/foo.cc:2:19: error: invalid operands of types 'double' and 'int' to binary 'operator|'
 const int maxn=1e4|1;
                ~~~^~
/in/foo.cc:23:13: error: size of array 'sum' is not an integral constant-expression
 int sum[maxn],n,m,t;
             ^
/in/foo.cc:44:14: error: size of array 'que' is not an integral constant-expression
  int que[maxn],end;
              ^

代码

#include<bits/stdc++.h>
const int maxn=1e4|1;
inline const void read(int &a)
{
	char c=getchar();int b=1;a=0;
	while(c<'0'||c>'9'){if(c=='-')b=-1;c=getchar();}
	while(c>='0'&&c<='9')
	{
		a=(a<<1)+(a<<3)+c-'0';
		c=getchar();
	}
	a*=b;
}
inline const void write(int a)
{
	if(a>9)write(a/10);
	putchar(a%10+'0');
}
inline const int lowbit(int a)
{
	return a&(-a);
}
int sum[maxn],n,m,t;
inline const void add(int a)
{
	while(a<=n)
	{
		sum[a]++;
		a+=lowbit(a);
	}
}
inline const int query(int a)
{
	int ans=0;
	while(a)
	{
		ans+=sum[a];
		a-=lowbit(a);
	}
	return ans;
}
struct monotonous_queue
{
	int que[maxn],end;
	inline const void init(){end=0;}
	inline const void add(int a)
	{
		if(empty()||a<que[end]){que[++end]=a;return ;}
		while(a>que[end]){que[end]=a;end--;}
	}
	inline const bool empty()
	{
		if(end)return false;
		return true;
	}
}s;
int main()
{
	read(n);read(m);read(t);
	memset(sum,0,sizeof(sum));
	while(m)
	{
		s.init();
		for(int i=1;i<=n;i++)
		{
			
		}
		m--;
	}
	for(int i=1;i<=n;i++){write(query(i));putchar(' ');}
	return 0;
}

信息

递交者
类型
递交
题目
骂战(原创)
题目数据
下载
语言
C++
递交时间
2017-10-11 21:43:45
评测时间
2017-10-11 21:43:45
评测机
分数
0
总耗时
1546ms
峰值内存
133.172 MiB