传送门
真的骚的一个题,看了半天只会个前缀和+暴力。。
纯考思维。。
良心题解
#include <cstdio> #include <cstring> #include <algorithm> #define M 41 #define N 100011 #define max(x, y) ((x) > (y) ? (x) : (y)) int n, m, ans, last; struct node }p[N]; inline bool cmp(node x, node y) inline bool check(int x, int y) int main() for(i = 1; i <= n; i++) for(j = 1; j <= m; j++) p[i].sum[j] = p[i].sum[m]; std::sort(p + 1, p + n + 2, cmp); last = p[1].id; for(i = 2; i <= n + 1; i++) printf("%d\n", ans); return 0; }
上一篇:hihoCoder#1196 : 高斯消元·二(开关灯问题)
下一篇:[luoguP3668] [USACO17OPEN]Modern Art 2 现代艺术2(栈)
思维









