binary search 구현2 서재에서 책 찾기
#include #include #include using namespace std; int n; string shelf[10]; int m; int ans = 100; string mlist[10]; int timelist[10]; int bin_search(int start, int end, string target, int lev) { //cout shelf[i]; } sort(&shelf[0], &shelf[n]); cin >> m; for (int i = 0;i > mlist[i] >> timelist[i]; } for (int i = 0;i < m;i++) { int lev = bin_search(0, n-1, mlist[i], 1); if (lev