Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
101956 Tom0 矩阵排序 C++ 解答错误 10 28 MS 744 KB 506 2023-09-11 14:55:58

Tests(1/10):


#include <iostream> #include <algorithm> using namespace std; typedef long long LL; int n, m; string s[505]; int main() { cin >> n >> m; for (int i = 1; i <= n; i++) for (int j = 1; j <= m; j++) { char ch; cin >> ch; s[i] += ch; } sort(s + 1, s + n + 1); for (int i = 1; i <= n; i++) { for (int j = 0; j < m; j++) cout << s[i][j] << " "; cout << endl; } return 0; }


测评信息: