#define _USE_MATH_DEFINES #pragma region include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include //// #include // #pragma endregion //#include ///////// #pragma region typedef typedef long long LL; typedef long double LD; typedef unsigned long long ULL; #pragma endregion //typedef ////定数 const int INF = (int)1e9; const LL MOD = (LL)1e9+7; const LL LINF = (LL)4e18+20; const LD PI = acos(-1.0); const double EPS = 1e-9; ///////// using namespace::std; #pragma region namespace RAND{ unsigned long xor128(){ static unsigned long x=123456789,y=362436069,z=521288629,w=88675123; unsigned long t; t=(x^(x<<11));x=y;y=z;z=w; return( w=(w^(w>>19))^(t^(t>>8)) ); } LL getRAND(LL P){ return ((xor128()%P)+P)%P; } } #pragma endregion //乱数 int N,M; int best; int nowVal;//現在の値 vector A; vector use;//使用中 vector Notuse;//未使用 vector bestUse; void cal(){//一回だけ int ret = 0; for(int i=0;i>N>>M; A = vector(N); for(int i=0;i>A[i]; } sort(A.begin(),A.end()); reverse(A.begin(),A.end()); use = vector(M); Notuse = vector(N-M); for(int i=0;i>4) ){ if( best -nowVal < 0 ){ best = nowVal; bestUse = use; } }else{// { swap( Notuse[ter0],use[ter1] ); nowVal ^= val; } } } output(); } #pragma region main signed main(void){ std::cin.tie(0); std::ios::sync_with_stdio(false); std::cout << std::fixed;//小数を10進数表示 cout << setprecision(16);//小数点以下の桁数を指定//coutとcerrで別 solve(); } #pragma endregion //main()