일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 최대공약수
- 다이나믹프로그래밍
- 코테준비
- 리시프
- 시스템콜
- Dijkstra
- C++
- sql고득점kit
- 우선순위큐
- DP
- 스택
- set
- 코테
- 동적계획법
- 정렬
- MySQL
- 프로그래머스
- vector
- MAP
- 코딩테스트연습
- 플로이드와샬
- 알고리즘
- String
- 참고 문헌 : MACHINE LEARNING 기계학습 _ 오일석
- 문자열
- 백준
- unordered_map
- dfs
- substr
- 다익스트라
- Today
- Total
목록백준 (11)
YeJin's Footsteps

문제 링크 https://www.acmicpc.net/problem/9370 9370번: 미확인 도착지 (취익)B100 요원, 요란한 옷차림을 한 서커스 예술가 한 쌍이 한 도시의 거리들을 이동하고 있다. 너의 임무는 그들이 어디로 가고 있는지 알아내는 것이다. 우리가 알아낸 것은 그들이 s지점에서 www.acmicpc.net 문제 풀이 코드 #include #include #include #include #include using namespace std; using P = pair; const int INF=987654321; const int MN=2001; vector graph[MN]; vector Dijkstra(int N, int S){ vector Dijk(N+1,INF); priority..

문제 링크 https://www.acmicpc.net/problem/1238 1238번: 파티 첫째 줄에 N(1 ≤ N ≤ 1,000), M(1 ≤ M ≤ 10,000), X가 공백으로 구분되어 입력된다. 두 번째 줄부터 M+1번째 줄까지 i번째 도로의 시작점, 끝점, 그리고 이 도로를 지나는데 필요한 소요시간 Ti가 들어 www.acmicpc.net 문제 풀이 코드 #include #include #include #include using namespace std; using P = pair; const int MN=1010; const int INF=1e9; vector graph [MN]; int Dist[MN]; int Answer[MN]; void Dijkstra(int S){ priority_..

문제 링크 https://www.acmicpc.net/problem/2458 2458번: 키 순서 1번부터 N번까지 번호가 붙여져 있는 학생들에 대하여 두 학생끼리 키를 비교한 결과의 일부가 주어져 있다. 단, N명의 학생들의 키는 모두 다르다고 가정한다. 예를 들어, 6명의 학생들에 대하여 www.acmicpc.net 문제 풀이 코드 #include #include using namespace std; const int MN = 501; bool floyd[MN][MN]; int main(void){ int N, M; cin>>N>>M; for(int i=0; i>u>>v; floyd[u][v]=true; } for(int k=1; k

문제 링크 https://www.acmicpc.net/problem/11404 11404번: 플로이드 첫째 줄에 도시의 개수 n이 주어지고 둘째 줄에는 버스의 개수 m이 주어진다. 그리고 셋째 줄부터 m+2줄까지 다음과 같은 버스의 정보가 주어진다. 먼저 처음에는 그 버스의 출발 도시의 번호가 www.acmicpc.net 문제 풀이 코드 #include #include #define MAX 1e9 using namespace std; const int MN=101; int n,m; int floyd[MN][MN]; int main(void){ cin>>n>>m; for(int i=1; i>v>>w; floyd[u][v]=min(floyd[u][v],w); } for(int k=1; k

문제 링크 https://www.acmicpc.net/problem/11403 11403번: 경로 찾기 가중치 없는 방향 그래프 G가 주어졌을 때, 모든 정점 (i, j)에 대해서, i에서 j로 가는 경로가 있는지 없는지 구하는 프로그램을 작성하시오. www.acmicpc.net 문제 풀이 코드 #include using namespace std; const int MN = 101; int floyd[MN][MN]; int main(void){ int n; cin>>n; for(int i=0; ia; floyd[i][j]=a; } } for(int k=0; k