Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 코틀린
- hilt
- DataBinding
- onMeasure
- Android
- CollapsingToolbarLayout
- Behavior
- 알림
- activity
- kotlin
- Coroutine
- LiveData
- BOJ
- room
- View
- CoordinatorLayout
- CustomView
- notification
- 백준
- sqlite
- HTTP
- Algorithm
- onLayout
- AppBarLayout
- lifecycle
- recyclerview
- 알고리즘
- ViewModel
- 안드로이드
- Navigation
Archives
- Today
- Total
목록소수판별 (1)
개발일지
Algorithm in A..Z - 에라토스테네스의 체
개념 소수를 판별하는 알고리즘 작동원리 1. 2부터 시작한다. 2. 방문하지 않은 숫자이면 그 숫자의 배수를 전부 체크한다. 3. 체크되지 않은 숫자는 소수이다. 시간복잠도 O(NloglogN) 문제 1978 소수찾기 www.acmicpc.net/problem/1978 1978번: 소수 찾기 첫 줄에 수의 개수 N이 주어진다. N은 100이하이다. 다음으로 N개의 수가 주어지는데 수는 1,000 이하의 자연수이다. www.acmicpc.net 코드 #include #include using namespace std; constexpr int MAX = 1000; int main() { vector isPrime(MAX, true); isPrime[0] = isPrime[1] = false; for (in..
Algorithm (알고리즘)
2020. 11. 28. 20:14