ZF_20160921_Topcoder

SRM522 div1 03

#include
#include
#include
#include
#include
#define ll long long
#define For(ir,S) for(typeof(S.begin()) ir = S.begin(); ir!=S.end(); ir++)
using namespace std;
const int _=60;
class PointErasing
{
public:
    int ok(int a,int b,int c)
    {
        return ab and b>c;
    }
    int ok(int x1,int y1,int x2,int y2,int x3,int y3)
    {
        return ok(x1,x2,x3) and ok(y1,y2,y3);
    }
    int n;
    int can[_],must[_],ins[_][_][_];
    int vis[_];
    setS;
    mapint>M;
    vector<int> getOutcomes(vector<int> y)
    {
        memset(ins,0,sizeof ins);
        memset(can,0,sizeof can);
        memset(must,0,sizeof must);
        n=y.size();
        for(int i=0;ifor(int j=0;jfor(int k=0;kif(ins[i][j][k])
                        can[i] = 1;
                }
            }
        }
        for(int i=0;ifor(int j=0;jfor(int k=0;kif(!can[j] and !can[k] and ins[i][j][k])
                        must[i]=1;
        S.clear();
        /// j,k包含哪些点
        for(int j=0;jfor(int k=0;k0;
                for(int i=0;iif(!must[i] and ins[i][j][k])
                        t|=1LL<1]=0;
        For(it,S)
        {
            For(ir,M)
            {
                ll t = *it;
                if(ir->first==0 or (t & ir->first) != ir->first)
                {
                    M.insert(make_pair(t,ir->second+__builtin_popcountll(t & (~ir->first))));
                }
            }
        }
        memset(vis,0,sizeof vis);
        For(it,M)
            vis[it->second]=1;
        vector<int>res;
        int cnt=0;
        for(int i=0;ifor(int i=50;i>=0;i++)
        {
            if(vis[i])
                res.push_back(n-i));
        }
        return res;
    }
};

int main()
{

}

你可能感兴趣的:(ZYX)