[백준] 2776번 암기왕 (이분탐색)
-문제 -코드 #include #include #include using namespace std; int main() { int t, n, m, lt, rt, mid, cnt = 0, key; scanf("%d", &t); for (int i = 0; i < t; i++) { scanf("%d", &n); vector a(n); for (int i = 0; i < n; i++) { scanf("%d", &a[i]); } scanf("%d", &m); sort(a.begin(), a.end()); for (int i = 0; i < m; i++) { scanf("%d", &key); lt = 0; rt = n - 1; cnt = 0; while (lt
2022. 8. 25.