Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
101957 Tom0 矩阵排序 C++ 解答错误 10 44 MS 8068 KB 519 2023-09-11 15:16:53

Tests(1/10):


#include <iostream> #include <vector> #include <algorithm> using namespace std; int main() { int n, m; cin >> n >> m; vector<vector<string>> matrix(n, vector<string>(m)); for(int i = 0; i < n; ++i) for(int j = 0; j < m; ++j) cin >> matrix[i][j]; sort(matrix.begin(), matrix.end()); for(const auto &row : matrix) { for(const auto &num : row) cout << num << ' '; cout << '\n'; } return 0; }


测评信息: