简洁优雅地获取vector<vector<int>>中各个元素的size()的最大值

image

敬谢不敏。

size_t max_y = 0, y;
for (const auto& col : _lts) ((y = col.size()) > max_y) && (max_y = y);

posted @ 2025-11-11 10:05  华容道专家  阅读(3)  评论(0)    收藏  举报