Repo: tdvipp/Applied_Algorithms
Repository này tổng hợp các bài cài đặt/ôn tập thuật toán, được nhóm theo chủ đề.
Mỗi mục bên dưới liệt kê các file tương ứng để bạn dễ tìm.
- Prim:
Mo_phong_ly_thuyet_do_thi/prim_al.cpp - Kruskal + DSU/Union-Find:
Mo_phong_ly_thuyet_do_thi/krushkal_union_find.cpp - (Bản khác/ghi chú):
others/MST_KRUSKAL.cpp
Mo_phong_ly_thuyet_do_thi/topo_sort.cpp
Mo_phong_ly_thuyet_do_thi/build_num_and_low_array.cpp
Thuc_hanh_buoi_5/BRIDGES_ARTI_POINTS.cpp
Thuc_hanh_buoi_5/STRONGLY_CONNECTED_COMPONENT.cpp
- Bus inter-city routing:
Mo_phong_ly_thuyet_do_thi/BUS_INTER_CITY.cpp - Check bipartite graph (BFS + tô màu):
others/check_bipartite_graph.cpp
others/DFS_LIST_SEQ_NODES_LEX.cpp
Thuc_hanh_buoi_5/BRIDGES_ARTI_POINTS.cppThuc_hanh_buoi_5/STRONGLY_CONNECTED_COMPONENT.cppMo_phong_ly_thuyet_do_thi/build_num_and_low_array.cpp
- Check bipartite (tô màu 2 phía):
others/check_bipartite_graph.cpp
- Maze solving (traversal trên grid):
Thuc_hanh_buoi_1/maze.cpp
- Range Minimum Query (RMQ):
Thuc_hanh_buoi_1/range_minimum_query.cpp
- Largest black sub-rectangle (thường giải bằng histogram + stack):
Thuc_hanh_buoi_1/largest_black_subrectangle.cpp
- CBUS (dạng backtracking / TSP-like):
Thuc_hanh_buoi_2/CBUS.cpp - BCA (phân công/điều kiện xung đột, backtracking + kiểm tra):
Thuc_hanh_buoi_2/BCA.cpp - Hamilton cycle (brute-force/backtracking):
others/HAM_CYCLE.cpp - TSP (backtracking/nhánh cận):
others/TSP.cpp - Route planning (biến thể gần TSP):
others/do_thi_route_planning.cpp - K-path (đếm/tìm đường đi độ dài k, dùng TRY/quay lui):
others/do_thi_k_path.cpp - DIGITS (bài thi, quay lui gán chữ số):
De_thi_giua_ky/De_1/bai_3_DIGITS.cpp
- Count integer solutions of linear equation:
Thuc_hanh_buoi_2/COUNT_INTEGER_LINEAR_EQUATION.cpp
- Inversion counting:
Thuc_hanh_buoi_3/INVERSION.cpp
- Max distance subsequence:
Thuc_hanh_buoi_3/MAX_DISTANCE_SUB_SEQ.cpp - LIS (Longest Increasing Subsequence):
Thuc_hanh_buoi_3/lis1.cpp
- Max even (subarray) theo ý tưởng cumulative sum:
Thuc_hanh_buoi_4/MAX_EVEN_cusum.cpp
- Makespan scheduling:
Thuc_hanh_buoi_5/MAKE_SPAN_SCHEDULE.cpp
- Giữa kỳ:
De_thi_giua_ky/ - Cuối kỳ:
De_thi_cuoi_ky/
Bạn có thể build từng file độc lập:
g++ -std=c++17 -O2 -o main path/to/file.cpp
./mainVí dụ:
g++ -std=c++17 -O2 -o main Thuc_hanh_buoi_5/BRIDGES_ARTI_POINTS.cpp
./main