语法trick

for (int i = 1; i <= n; ++i) {
        cout << dist[i] << " \n"[i == n];
    }

posted @ 2025-03-09 23:34  lyrrr  阅读(12)  评论(0)    收藏  举报