LuoguP5322 [BJOI2019]排兵布阵(DP)
城为物,人为容,价值?排序后,一切都明了 #include <iostream> #include <cstdio> #include <cstring> #include <cstdlib> #include <algorithm> #include <cmath> #define R(a,b,c) for(register int a = (b); a <= (c); ++a) #define nR(a,b,c) for(register int a = (b); a >= (c); --a) #define Fill(a,b) memset(a, b, sizeof(a)) #define Swap(a,b) ((a) ^= (b) ^= (a) ^= (b)) #define QWQ #ifdef QWQ #define D_e_Line printf("\n---------------\n") #define D_e(x) cout << (#x) << " : " << x << "\n" #define Pause() system("pause") #define FileOpen() freopen("in.txt", "r", stdin) #define FileSave() freopen("out.txt", "w", stdout) #define