일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 자료구조 복습
- 숙명여자대학교 정보보안동아리
- 백준
- c++
- 웹페이지 만들기
- Javascript
- PHP 웹페이지 만들기
- BOJ Python
- c
- Sookmyung Information Security Study
- C언어
- 숙명여자대학교 정보보안 동아리
- lob
- 파이썬
- CSS
- siss
- The Loard of BOF
- WarGame
- 생활코딩
- XSS Game
- BOJ
- 드림핵
- hackctf
- hackerrank
- Python
- HTML
- 머신러닝
- SWEA
- 풀이
- 기계학습
- Today
- Total
목록c++ (39)
혜랑's STORY

code #define _CRT_SECURE_NO_WARNINGS #include #include #include #include #include #include using namespace std; int dp[2][100001] = { 0 }; int line[2][100001] = { 0 }; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int t; cin >> t; int n; for (int tc = 0; tc > n; for (int i = 0; i > line[0][i]; for (int i = 0; i > lin..

code #define _CRT_SECURE_NO_WARNINGS #include #include #include #include #include #include using namespace std; #define MAX 100001 int parent[MAX]; vector tree[MAX]; void search(int node) { for (int i = 0; i < tree[node].size(); i++) { if (parent[tree[node][i]] == 0) { parent[tree[node][i]] = node; search(tree[node][i]); } } } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.ti..

code #define _CRT_SECURE_NO_WARNINGS #include #include #include #include #include #include using namespace std; typedef struct node { char left; char right; }; node tree[27]; void inorder(char data); void preorder(char data); void postorder(char data); int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n; cin >> n; char root, left, right; for (int i = 0; i < n; i++..

# 문제 # 풀이 #define _CRT_SECURE_NO_WARNINGS #include #include #include #include #include #include using namespace std; int d[1000001] = { 0, 0, 1, 1 }; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n; cin >> n; for (int j = 4; j d[j / 2] + 1) d[j] = d[j / 2] + 1; if (j % 3 == 0 && d[j] > d[j / 3] + 1) d[j] = d[j / 3] + 1; } printf("%d\n", d[n]); return 0; } 1에서 ..

# 문제 # 풀이 #define _CRT_SECURE_NO_WARNINGS #include #include #include #include #include #include using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int d[41] = { 0, 1 }; for (int i = 2; i > t; for (int i = 0; i > n; if (n == 0) printf("1 0\n"); else printf("%d %d\n", d[n-1], d[n]); } return 0; } 제한시간이 매우 짧기 때문에 재귀함수를 사용하여 문제를 해결하면 시..

# 문제 1부터 50까지의 봉투 중 토끼가 들어있는 봉투를 알려준다. 봉투를 열어볼 땐 이분법을 사용한다. 따라서 맨 처음 열어보는 봉투는 항상 25가 된다. 이 때 열어보는 봉투를 모두 출력하라. # 풀이 #define _CRT_SECURE_NO_WARNINGS #include #include #include #include #include #include using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int low, high, mid; int key; cin >> key; while (key != 0) { low = 1, high = 50; while (low

# 문제 # 풀이 #define _CRT_SECURE_NO_WARNINGS #include #include #include #include #include #include using namespace std; int search(int* list, int key, int size) { int low = 0, high = size - 1, mid; while (low > t; for (int tc = 0; tc > n; int* list1 = new int[n]; for (int i = 0; i > list1[i]; sort(list1, list1 + n); cin >> m; for (int i = 0; i > key..

# 문제 # 풀이 #define _CRT_SECURE_NO_WARNINGS #include #include #include #include #include #include using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); long long low = 0, high = -999, mid, cnt; int n, m; cin >> n >>m; int* list = new int[n]; for (int i = 0; i > list[i]; if (high < list[i]) high = list[i]; } while (low 0) cnt += list[i] ..