新网创想网站建设,新征程启航
为企业提供网站建设、域名注册、服务器等服务
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<