十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
3
75 15 21
75 15 28
34 70 5
188
View Code#include
#include
using std::stack;
const int INF = 0x3f3f3f3f ;
const int MAXN = 1<<19 ;
int okay[MAXN/2], valid, n, cnt;
int g[25][25];
int dp[2][MAXN/2];
void judge()
{
for(int i=0; i<=valid; i++)
if(!(i&(i<<1)))
okay[++cnt] = i;
}
int sum(int x, int row)
{
int times = n, res = 0 ;
while( x )
{
if( x%2 )
res+= g[row][times];
x= x/2 ;
times-- ;
}
return res;
}
int max(int a, int b)
{return a>=b ?a :b ; }
int main()
{
int i, j, row;
bool flag ;
while(scanf("%d", &n)!=EOF)
{
cnt= 0;
valid= (1<