![](http://i1.daumcdn.net/thumb/C148x148/?fname=https://blog.kakaocdn.net/dn/sTn2Y/btsrqFXHxCC/KoysMbOl7FEcWKuZJInQu0/img.jpg)
백준 4949번 균형잡힌 세상https://www.acmicpc.net/problem/4949 4949번: 균형잡힌 세상각 문자열은 마지막 글자를 제외하고 영문 알파벳, 공백, 소괄호("( )"), 대괄호("[ ]")로 이루어져 있으며, 온점(".")으로 끝나고, 길이는 100글자보다 작거나 같다. 입력의 종료조건으로 맨 마지막에www.acmicpc.net 정답 코드#include #include #include using namespace std; int find(string a) { string finish = " ."; if (a == finish) return 1; stacks; for (int x = 0; x < a.length(); x++) { if (a[x] == '(' || a[x] == ..
![](http://i1.daumcdn.net/thumb/C148x148/?fname=https://blog.kakaocdn.net/dn/RaybQ/btsrr2revsO/Ux1EG6TyzH1bVVcHykQYF0/img.jpg)
백준 4948번 베르트랑 공존https://www.acmicpc.net/problem/4948 4948번: 베르트랑 공준베르트랑 공준은 임의의 자연수 n에 대하여, n보다 크고, 2n보다 작거나 같은 소수는 적어도 하나 존재한다는 내용을 담고 있다. 이 명제는 조제프 베르트랑이 1845년에 추측했고, 파프누티 체비쇼www.acmicpc.net 정답 코드#include using namespace std; int a, b; int arr[250000] = { 1,1,0 }; void find(int a, int b); int main() { while (1) { cin >> a; if (a == 0) return 0; b = 2 * a; find(a, b); int sum = 0; for (int x = ..
![](http://i1.daumcdn.net/thumb/C148x148/?fname=https://blog.kakaocdn.net/dn/cMvyxH/btsrxmu2ISE/CTdp4RUMkGEnRTucGfTw71/img.jpg)
백준 4673번 셀프 넘버https://www.acmicpc.net/problem/4673 4673번: 셀프 넘버셀프 넘버는 1949년 인도 수학자 D.R. Kaprekar가 이름 붙였다. 양의 정수 n에 대해서 d(n)을 n과 n의 각 자리수를 더하는 함수라고 정의하자. 예를 들어, d(75) = 75+7+5 = 87이다. 양의 정수 n이 주어졌을 때,www.acmicpc.net 정답 코드#include using namespace std; int arr[10001]; int main() { int res = 0; for (int x = 1; x
![](http://i1.daumcdn.net/thumb/C148x148/?fname=https://blog.kakaocdn.net/dn/IlXzJ/btsrq7TvTo1/Lmj9RVbKjsWzOMT2TqwTw0/img.jpg)
백준 4344번 평균은 넘겠지https://www.acmicpc.net/problem/4344 4344번: 평균은 넘겠지각 케이스마다 한 줄씩 평균을 넘는 학생들의 비율을 반올림하여 소수점 셋째 자리까지 출력한다. 정답과 출력값의 절대/상대 오차는 10-3이하이면 정답이다.www.acmicpc.net 정답 코드#include int arr[1001] = { 0 }; int main() { int n,m; scanf("%d", &n); for (int x = 0; x < n; x++) { scanf("%d", &m); int sum=0,cnt=0; float res = 0; for (int y = 0; y < m; y++) { scanf("%d", &arr[y]); sum += arr[y]; } res =..
- Total
- Today
- Yesterday
- 이분 매칭
- 유니온 파인드
- java
- DFS
- 알고리즘
- 자바스크립트
- 스프링 부트 crud 게시판 구현
- C++ Stack
- 자바
- c++ string
- 에라토스테네스의 체
- 카운팅 정렬
- 유클리드 호제법
- C++
- js
- BFS
- 세그먼트 트리
- html
- 반복문
- 투 포인터
- 우선순위 큐
- 백준 풀이
- 백준
- Do it!
- HTML5
- 알고리즘 공부
- DP
- CSS
- 스택
- 자료구조
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |