일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- enumasByue
- makeweakobjectptr
- C++
- 구조적 바인딩
- 프로그래머스
- 정렬알고리즘
- 선택정렬
- 스마트포인터
- 애셋로드
- BFS
- moreeffectiveC++
- unorder_map
- 언리얼가비지컬렉터
- 데이터애셋
- UE_LOG
- map
- 비동기호출방법
- 알고리즘
- C++최적화
- 크리티컬섹션
- tweakobjectptr
- 강참조
- UML관련
- 람다
- dataasset
- 델리게이트
- 정렬
- 자료구조
- 약참조
- stl
- Today
- Total
목록Note (430)
기억을 위한 기록들
www.acmicpc.net/problem/2210 2210번: 숫자판 점프 111111, 111112, 111121, 111211, 111212, 112111, 112121, 121111, 121112, 121211, 121212, 211111, 211121, 212111, 212121 이 가능한 경우들이다. www.acmicpc.net #include using namespace std; int map[6][6]; int dir[4][2] = { {-1,0} ,{0,1} ,{1,0} ,{0,-1} }; int check[1000000]; int result; void dfs(int x, int y, int sum, int depth) { if (depth == 5) { if (check[sum] ==..
www.acmicpc.net/problem/18238 18238번: ZOAC 2 2019년 12월, 두 번째로 개최된 ZOAC의 오프닝을 맡은 성우는 누구보다 화려하게 ZOAC를 알리려 한다. 작년 ZOAC의 방식은 너무 식상하다고 생각한 성우는 문자열을 보여주는 새로운 규칙을 고안해 www.acmicpc.net #include #include #include using namespace std; int main() { string n; int curCnt = 0; int curCnt2 = 0; int result = 0; char curLocation = 'A'; cin >> n; for (int i = 0; i < n.size(); i++) { curCnt = abs(n[i] - curLocation..
www.acmicpc.net/problem/2810 2810번: 컵홀더 첫째 줄에 좌석의 수 N이 주어진다. (1 ≤ N ≤ 50) 둘째 줄에는 좌석의 정보가 주어진다. www.acmicpc.net #include #include #include using namespace std; int main() { int n; cin >> n; string input; cin >> input; int cnt = 1; //컵홀더 1개 깔고 시작 int i = 0; while(i < input.size()) { if (input[i] == 'S') //싱글 의자 { cnt++; i++; } else { cnt++; i += 2; } } cout
www.acmicpc.net/problem/2670 2670번: 연속부분최대곱 첫째 줄은 나열된 양의 실수들의 개수 N이 주어지고, 그 다음 줄부터 N개의 수가 한 줄에 하나씩 들어 있다. N은 10,000 이하의 자연수이다. 실수는 소수점 첫째자리까지 주어지며, 0.0보다 크거나 www.acmicpc.net #include #include using namespace std; int main() { int n; cin >> n; double arr[10001] = { 0.f }; double dp[10001] = { 0.f }; for (int i = 1; i > arr[i]; } dp[1] = arr[1]; double result = -1; for (int i = 2; i
www.acmicpc.net/problem/9655 9655번: 돌 게임 상근이가 게임을 이기면 SK를, 창영이가 게임을 이기면 CY을 출력한다. www.acmicpc.net #include #include using namespace std; int main() { int n; cin >> n; if (n % 2 == 0) { cout
www.acmicpc.net/problem/13301 13301번: 타일 장식물 대구 달성공원에 놀러 온 지수는 최근에 새로 만든 타일 장식물을 보게 되었다. 타일 장식물은 정사각형 타일을 붙여 만든 형태였는데, 한 변이 1인 정사각형 타일부터 시작하여 마치 앵무조개 www.acmicpc.net #include #include using namespace std; int main() { int n; cin >> n; long long dp[81] = { 0 }; dp[1] = 4; dp[2] = 6; dp[3] = 10; dp[4] = 16; for (int i = 5; i
스마트 포인터는 3가지가 있다. - unique_ptr (유니크) - shared_ptr (쉐어드) - weak_ptr (위크) 우선 일반 포인터를 보면 //... int main() { Vector* myVector = new Vector(10.f, 30.f); //... delete myVector; return 0; } 이런식으로 delete를 해줘야 한다. 그러나 //... int main() { Vector* myVector = new Vector(10.f, 30.f); if(true) { return 0; //early return } delete myVector; return 0; } 중간에 끝나버리거나(try catch와 같은), delete을 잊으면 메모리 누수(memory leak)가 ..
programmers.co.kr/learn/courses/30/lessons/43163 코딩테스트 연습 - 단어 변환 두 개의 단어 begin, target과 단어의 집합 words가 있습니다. 아래와 같은 규칙을 이용하여 begin에서 target으로 변환하는 가장 짧은 변환 과정을 찾으려고 합니다. 1. 한 번에 한 개의 알파벳만 바꿀 수 programmers.co.kr #include #include #include using namespace std; int answer = 214000000; int check[51]; void D(string begin, string target, vector words, int cnt = 0) { int n = words.size(); for (int i = ..
programmers.co.kr/learn/courses/30/lessons/43162 코딩테스트 연습 - 네트워크 네트워크란 컴퓨터 상호 간에 정보를 교환할 수 있도록 연결된 형태를 의미합니다. 예를 들어, 컴퓨터 A와 컴퓨터 B가 직접적으로 연결되어있고, 컴퓨터 B와 컴퓨터 C가 직접적으로 연결되어 있 programmers.co.kr #include #include #include #include using namespace std; bool check[201]; int solution(int n, vector computers) { int answer = 0; queue q; for (int index = 0; index < n; index++) { if(check[index + 1]) contin..
www.acmicpc.net/problem/10989 10989번: 수 정렬하기 3 첫째 줄에 수의 개수 N(1 ≤ N ≤ 10,000,000)이 주어진다. 둘째 줄부터 N개의 줄에는 숫자가 주어진다. 이 수는 10,000보다 작거나 같은 자연수이다. www.acmicpc.net #include #include using namespace std; int main() { int n; int input; cin.tie(NULL); ios::sync_with_stdio(false); cin >> n; int arr[10001] = { 0 }; for (int i = 0; i > input; arr[input] += 1; } for (int i = 1; i
www.acmicpc.net/problem/2751 2751번: 수 정렬하기 2 첫째 줄에 수의 개수 N(1 ≤ N ≤ 1,000,000)이 주어진다. 둘째 줄부터 N개의 줄에는 숫자가 주어진다. 이 수는 절댓값이 1,000,000보다 작거나 같은 정수이다. 수는 중복되지 않는다. www.acmicpc.net #include #include using namespace std; int main() { int n; cin.tie(NULL); ios::sync_with_stdio(false); //7,8번줄 있고 없고 차이가 크다. cin >> n; int* arr = new int[n]; for (int i = 0; i > arr[i]; } sort(arr, arr + n);..
www.acmicpc.net/problem/2750 2750번: 수 정렬하기 첫째 줄에 수의 개수 N(1 ≤ N ≤ 1,000)이 주어진다. 둘째 줄부터 N개의 줄에는 숫자가 주어진다. 이 수는 절댓값이 1,000보다 작거나 같은 정수이다. 수는 중복되지 않는다. www.acmicpc.net #include using namespace std; int n; void SelectSort(int *arr) { int curIndex = 0; for (int i = 0; i arr[j]) { curIndex = j; } } int temp = arr[curIndex];..