문제 : https://www.acmicpc.net/problem/9466 #include #include #include #include using namespace std; int test_case; int student_num; int graph[100001]; bool visited[100001]; bool finished[100001]; int cnt=0; void DFS(int now_pos) { visited[now_pos] = true; int next = graph[now_pos]; if (visited[next] == true) { // != if(vistied && finished) else 처리에서 달라진다. if (finished[next] == false) { int first_..
문제 : https://www.acmicpc.net/problem/2331 문제의 INPUT을 배열해보면 위의 그림과 같은 형식으로 나오게 된다. 다음 숫자(next number)를 구하는 방법은 while (A != 0) { calcul_res += (int)pow(A % 10, P); A /= 10; } 을 이용하면 되고, 백터의 처음 부터 끝까지를 탐색하며, 다음 숫자와 동일한 경우 함수를 끝마친다.그렇지 않을 경우, 백터에 지속적으로 다음 숫자를 추가해준다. #include #include #include using namespace std; int A, P; int calcul_res = 0; int res = 0, position = 0; vector arr; int function() { a..
문제 : https://www.acmicpc.net/problem/10451 #include #include #include #include #include #include using namespace std; vector graph[1001]; bool visited[1001] = { false }; int edge_num, vertex_index;//edge_num = vertex_num int cnt = 0; void DFS(int position, int start_pos) { visited[position] = true; for (int i = 0; i < graph[position].size(); i++) { int next_position = graph[position][i]; if (nex..
- Total
- Today
- Yesterday
- Add TapGesture
- 코딩야학
- BFS
- 데이터 바인딩
- Custom Cell
- 객체
- listview
- WPF
- 백준온라인
- 백준
- Cell Animation
- DP
- 타일링
- 생활코딩
- Fakebook
- Grid
- FEED
- XAML
- 문자열
- 스택
- command
- CustomCollectionViewCell
- BOJ
- C++
- MVVM
- dfs
- UIView Animation
- 그래프
- CollectionView
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |