第1回目はsayaさんの質問「関数を使って小さい順に並び替える」
質問の中では「3x3の行列」が登場するっぽかったけど、結局3つの整数のソートの質問でした。
C++で書くとこうなるよと。
#include
#include
#include
#include
using namespace std;
int main()
{
multiset s;
copy_n(istream_iterator(cin), 3, inserter(s, begin(s)));
copy(begin(s), end(s), ostream_iterator(cout, " "));
cout (cin), 3, inserter(s, begin(s)));
は、sの要素全てを、coutから作った出力イテレータに出力するよという意味。
どこにもソート処理は書いてないけど、multisetを使っているから自動でソートされます。