일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 자료구조
- UML관련
- 약참조
- 람다
- 정렬
- 정렬알고리즘
- 델리게이트
- 애셋로드
- unorder_map
- dataasset
- 스마트포인터
- 데이터애셋
- UE_LOG
- 크리티컬섹션
- BFS
- moreeffectiveC++
- 구조적 바인딩
- 프로그래머스
- stl
- C++
- enumasByue
- C++최적화
- map
- 선택정렬
- 강참조
- 알고리즘
- tweakobjectptr
- 비동기호출방법
- makeweakobjectptr
- 언리얼가비지컬렉터
- Today
- Total
목록Note (430)
기억을 위한 기록들
www.acmicpc.net/problem/1697 1697번: 숨바꼭질 수빈이는 동생과 숨바꼭질을 하고 있다. 수빈이는 현재 점 N(0 ≤ N ≤ 100,000)에 있고, 동생은 점 K(0 ≤ K ≤ 100,000)에 있다. 수빈이는 걷거나 순간이동을 할 수 있다. 만약, 수빈이의 위치가 X일 www.acmicpc.net #include #include #include #include #include using namespace std; int N, K; int disArr[100001]; int NextLocation(int index, int number) { switch (index) { case 0: return -1 + number; case 1: return 1 + number; case 2..
www.acmicpc.net/problem/7576 7576번: 토마토 첫 줄에는 상자의 크기를 나타내는 두 정수 M,N이 주어진다. M은 상자의 가로 칸의 수, N은 상자의 세로 칸의 수를 나타낸다. 단, 2 ≤ M,N ≤ 1,000 이다. 둘째 줄부터는 하나의 상자에 저장된 토마토 www.acmicpc.net #include #include #include #include #include using namespace std; int n,m; int map[1000][1000]; int dis[1000][1000]; bool check[1000][1000]; int dx[4] = { -1,0,1,0 }; int dy[4] = { 0,1,0,-1 }; int main() { memset(dis, 0, s..
www.acmicpc.net/problem/2178 2178번: 미로 탐색 첫째 줄에 두 정수 N, M(2 ≤ N, M ≤ 100)이 주어진다. 다음 N개의 줄에는 M개의 정수로 미로가 주어진다. 각각의 수들은 붙어서 입력으로 주어진다. www.acmicpc.net #include #include #include #include #include using namespace std; int n,m; vector map[100]; int dis[100][100]; bool check[100][100]; int dx[4] = { -1,0,1,0 }; int dy[4] = { 0,1,0,-1 }; int main() { memset(dis, 0, sizeof(dis)); memset(check, false, s..
www.acmicpc.net/blog/view/56 입력 속도 비교 여러가지 언어와 입력 방법을 이용해서 시간이 얼마나 걸리는지 비교해 보았습니다. 방법: 첫째 줄에 정수의 개수 N (= 10,000,000), 둘째 줄부터 N개의 줄에 한 개의 자연수(10,000 이하)가 적힌 파일 www.acmicpc.net www.acmicpc.net/blog/view/57 출력 속도 비교 여러가지 언어와 출력 방법을 이용해서 시간이 얼마나 걸리는지 비교해 보았습니다. 방법: 총 N개의 줄에 1부터 10,000,000까지의 자연수를 한 줄에 하나씩 출력하는 시간을 측정. 10번 측정해서 평 www.acmicpc.net
www.acmicpc.net/problem/1012 1012번: 유기농 배추 차세대 영농인 한나는 강원도 고랭지에서 유기농 배추를 재배하기로 하였다. 농약을 쓰지 않고 배추를 재배하려면 배추를 해충으로부터 보호하는 것이 중요하기 때문에, 한나는 해충 방지에 www.acmicpc.net #include #include #include #include #include //memset 용 using namespace std; struct Location { int x; int y; Location(int _x, int _y) { x = _x; y = _y; } }; int main() { int map[50][50]; memset(map, 0, sizeof(map)); //초기화 int M, N, K; int..

#include #include using namespace std; int main() { char A = '1'; int Number = A - '0'; // 아스키코드값 49 - 48 cout
www.acmicpc.net/problem/2667 2667번: 단지번호붙이기 과 같이 정사각형 모양의 지도가 있다. 1은 집이 있는 곳을, 0은 집이 없는 곳을 나타낸다. 철수는 이 지도를 가지고 연결된 집의 모임인 단지를 정의하고, 단지에 번호를 붙이려 한다. 여 www.acmicpc.net #include #include #include #include #include using namespace std; vectormap[100]; vectorresult; int cnt = 0; int dx[4] = { -1,0,1,0 }; int dy[4] = { 0,1,0,-1 }; int n; struct Location { int x; int y; Location(int _x, int _y) { x = _..
www.acmicpc.net/problem/2606 2606번: 바이러스 첫째 줄에는 컴퓨터의 수가 주어진다. 컴퓨터의 수는 100 이하이고 각 컴퓨터에는 1번 부터 차례대로 번호가 매겨진다. 둘째 줄에는 네트워크 상에서 직접 연결되어 있는 컴퓨터 쌍의 수가 주어 www.acmicpc.net #include using namespace std; int map[100][100]; int Check[100]; int Computer = 0; int Line = 0; int cnt = 0; void DFS(int n){ Check[n] = 1; cnt++; for (int i = 1; i > Computer >> Line; for (int i = 0; i ..
www.acmicpc.net/problem/1260 1260번: DFS와 BFS 첫째 줄에 정점의 개수 N(1 ≤ N ≤ 1,000), 간선의 개수 M(1 ≤ M ≤ 10,000), 탐색을 시작할 정점의 번호 V가 주어진다. 다음 M개의 줄에는 간선이 연결하는 두 정점의 번호가 주어진다. 어떤 두 정점 사 www.acmicpc.net #include #include #include #include #include using namespace std; int VerNumber = 0; int LineNumber = 0; int StartNumber = 0; int CheckArr[10001]; vector node[1001]; void BFS() { queue q; q.push(StartNumber); i..
플러드 필 혹은 시드 필은 다차원 배열의 어떤 칸과 연결된 영역을 찾는 알고리즘이다. 이 알고리즘은 그림 프로그램에서 연결된 비슷한 색을 가지는 영역에 "채우기" 도구에 사용되며, 바둑이나 지뢰 찾기 같은 게임에서 어떤 비어 있는 칸을 표시 할 지를 결정할 때에도 사용된다. -출처: ko.wikipedia.org/wiki/%ED%94%8C%EB%9F%AC%EB%93%9C_%ED%95%84 플러드 필 - 위키백과, 우리 모두의 백과사전 위키백과, 우리 모두의 백과사전. 4방향 재귀적 플러드 필 플러드 필(영어: flood fill) 혹은 시드 필(영어: seed fill)은 다차원 배열의 어떤 칸과 연결된 영역을 찾는 알고리즘이다. 이 알고리즘은 그 ko.wikipedia.org
연산자 오버로딩을 이용한 sort #include #include #include #include using namespace std; struct Data { int money; int when; Data(int a, int b) { money = a; when = b; } bool operator b.when; } }; int main() { int n, i, j, a, b, res = 0, max = -2147000000; vector T; priority_queue pQ; scanf_s("%d", &n); for (i = 1; i max) max = b; } sort(T.begin(), T.end()); //정렬시 13번줄 return 0; } 사용 예 hyo-ue4study.tistory.com..
#include #include using namespace std; int check[10000]; int dir[3] = { 1,-1,5 }; int main() { int s, e; queue q; cin >> s >> e; check[s] = 1; //현재 시작 위치 q.push(s); int CurTarget = 0; int NextTarget = 0; while (!q.empty()) { CurTarget = q.front(); q.pop(); for (int i = 0; i < 3; i++) { NextTarget = CurTarget + dir[i]; //갈수 있는 위치 조사 if (NextTarget 10000) //범위 벗어날시 continue; if (NextTarget == e) {..