일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Eulerian circuit
- Shortest path
- Dag
- Cycle detecting
- mathematics
- dynamic programming
- Euler circuit
- POJ
- CS Academy
- DynamicProgramming
- BST
- GCD
- implementation
- flows
- Sieve_of_Eratosthenes
- disjoint-set
- scc
- BFSDFS
- Euler path
- Algospot
- bitmask
- Eulerian path
- BOJ
- graph
- backtracking
- Segment Tree
- 백준
- hashing
- graph modeling
- Greedy
- Today
- Total
목록Editorials (3)
그냥 하는 노트와 메모장
BOJ 14842 - 재홍의 사다리[ 분류 - 수학 ] 자세한 내용은 ppt를 참고해주시기 바랍니다. ※ 만약 파일 다운로드 기간이 만료되면 알려주세요
BOJ 15272 - 친구 팰린드롬2[ 분류 - 이분 매칭 ] 주의해야할 점은 하나밖에 없다. 바로 친한 친구더라도 동성이라면 춤을 추지 않는다는 것. 남자와 여자로 이분 그래프를 구성하고, 최대 매칭을 구한다. 구한 뒤, 로봇 댄스를 출 친구를 섭외할 수 있으면 +1를 해준다. #include #include #include using namespace std; const int MAX_V = 105; vector adj; vector bMatch; bool visit[MAX_V]; bool dfs(int n) { if (visit[n]) return 0; visit[n] = 1; for(int to : adj[n]) if (bMatch[to] == -1 || dfs(bMatch[to])) { bMat..
BOJ 15270 - 친구 팰린드롬 [ 분류 - 그래프 이론, 백트래킹 ] 출제하고 나서 시간이 꽤 지났지만, 역시 에디토리얼은 남겨야겠다고 생각해서 포스팅한다.. 문제 조건을 정리하면 아래와 같다. 1. A와 B가 춤을 추기로 되어 있다면 A는 B와 다른 친구와 춤을 출 수 없다. 2. 모든 친구는 로봇 댄스를 출 수 있다. 단순 최대 매칭과 + 로봇 댄스로 무대에 올릴 수 있는 최대값을 정할 수 있다. #include #include #include using namespace std; const int MAX_V = 21; vector adj; bool visit[MAX_V]; int N; int go(int vn, int cnt) { if (vn == N) return cnt; if (visit[..