aptoro.jp

ずぼら人間のブログ.技術系ブログにしたかった何か

2019-12-14から1日間の記事一覧

二分探索木

twitterで,二分探索木をどう書くか,という話があったので書いてみた. #include <iostream> #include <cstdlib> #include <ctime> #include <fstream> using namespace std; ofstream ofs("result.csv", ios::app); int bST(int ans, int min, int max) { int result = (max + min) / 2; ofs <</fstream></ctime></cstdlib></iostream>…