code:
#include <set>
#include <cstring>
#include <cstdio>
using namespace std;
int n,a[105][105][105];
int lowbit(int x)
{
return x&(-x);
}
void update(int x,int y,int z)
{
int i,j,k;
for(i=x;i<=n;i+=lowbit(i))
for(j=y;j<=n;j+=lowbit(j))
for(k=z;k<=n;k+=lowbit(k))
a[i][j][k]++;
}
int getsum(int x,int y,int z)
{
int i,j,k,sum=0;
for(i=x;i>0;i-=lowbit(i))
for(j=y;j>0;j-=lowbit(j))
......
阅读全文