class Solution {
public:
int kthSmallest(vector<vector<int>>& matrix, int k) {
vector<int> st;
//编程技巧
for( auto temp: matrix)
{
for( auto num: temp)
{
st.push_back( num );
}
}
sort( st.begin(), st.end() );
return st[k-1];
}
}; 
京公网安备 11010502036488号