Lang:G++
Edit12345678910111213141516171819202122232425262728293031#include <iostream>#include<cstring>#include <vector>#include <stack>#include <queue>#include <algorithm>using namespace std;int height[100000000] = { 0 };int main() {int n;while (scanf("%d", &n) != EOF) {vector<int> ceng(n);vector<int> width;for (int i = 0; i < n; i++) {scanf("%d", &ceng[i]);int th, tmpheight = 0;for (int j = 0; j < ceng[i]; j++) {scanf("%d", &th);tmpheight += th;if (j < ceng[i] - 1) {width.push_back(tmpheight);}}}sort(width.begin(), width.end());int maxceng = 0, tmpmax = 1;for (int i = 1; i < width.size(); i++) {if (width[i] == width[i - 1])tmpmax++;