Jinsoolve.

Categories

Tags

3월 안에는 꼭...

Portfolio

About

c++에서 내림차순에 대한 lower_bound와 upper_bound하기

Created At: 2025/02/10

1 min read

내림차순 정렬이 되어있을 때의 lower_bound와 upper_bound 사용법

cpp
1lower_bound(v.begin(), v.end(), num, greater<int>());
  • lower_bound := num과 같거나 작은 원소들 중 첫번째 원소
  • upper_bound := num보다 작은 원소들 중 첫번째 원소

관련 포스트가 5개 있어요.

삼격형의 두 변의 길이와 사잇각을 알 때, 나머지 한 변의 길이를 구하는 공식

위와 같은 삼각형이 존재할 때, 변의 길이 b, c와 그 사잇각 α\alphaα를 알고 있다고 가정하자. 이때 a의 길이를 구하는 공식은 다음과 같다. a=b2+c2−2bccos…

2025/02/20

NEW POST
profile

김진수

Currently Managed

Currently not managed

© 2025. junghyeonsu & jinsoolve all rights reserved.