Skip to content

Commit 0c1a801

Browse files
committed
2 parents 0646424 + 7bf23b1 commit 0c1a801

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

7/5.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ int main(void) {
3030
cin >> x;
3131
arr.push_back(x);
3232
}
33+
34+
// 이진 탐색을 수행하기 위해 사전에 정렬 수행
35+
sort(arr.begin(), arr.end());
36+
3337
cin >> m;
3438
for (int i = 0; i < m; i++) {
3539
int target;
@@ -47,4 +51,4 @@ int main(void) {
4751
cout << "no" << ' ';
4852
}
4953
}
50-
}
54+
}

0 commit comments

Comments
 (0)