#include #include #include using namespace std; struct group { int ppl; int x, y; } g[101]; int main() { int N, M; freopen("bdz.in", "r", stdin); freopen("bdz.out", "w", stdout); cin >> N >> M; for (int i=1; i> g[i].ppl >> g[i].x >> g[i].y; } int currentPeople(0), max(0); for (int i=1; i max) { max = currentPeople; } } if (g[j].y == i) currentPeople -= g[j].ppl; } } cout << ceil((double)max/(double)64) << endl; return 0; }