#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