#include using namespace std; typedef unsigned int uint; typedef long long int ll; typedef unsigned long long int ull; #define debugv(v) printf("L%d %s => ",__LINE__,#v);for(auto e:v){cout< ",__LINE__,#m);for(int x=0;x<(w);x++){cout<<(m)[x]<<" ";}cout<>=1,k++)s=(s<<1)|(u&1);for(;0>=1)cout<<(s&1);}} #define TIME chrono::system_clock::now #define MILLISEC(t) (chrono::duration_cast(t).count()) template ostream& operator <<(ostream &o,const pair p){o<<"("<>=1){ if (b&1){ score+=data[i][pos]; } } bit|=1<<(pos); // 次にi,...を置くことによって得られる得点 for (i=0,b=bit;i>=1){ if (!(b&1)){ high=max(high,calc(bit,i)); } } i = high+score; return pmemo = ((!i)?-1:i); } int main(){ int i,j,k,l; cin>>n>>m; for (i=0;i