This repository contains source codes of the solutions of the problems provided by BAEKJOON ONLINE JUDGE. BAEKJOON ONLINE JUDGE provides a lot of good problems including the problems featured in prominent domestic and international competitions. There are 172 solutions in this repository. The source codes are written using C++, and each file contains the summarization of constraints of input and output of each problem. Note that few solutions - actually one problem(25207) - are not working because I am trying to solve the problems. And, I tried to solve some problems in this repository in diverse manner, so there are multiple solution files of one problem in this repository.
The solutions in this repository are solved using diverse algorithms and methods. The type is defined as the category of BAEKJOON ONLINE JUDGE, and a problem can has multiple types. Note that some categories of BAEKJOON ONLINE JUDGE don't be used as type, because the unused categories are a subset of other categories. For example, Primality Test, Sieve Of Eratosthenes, (Extended) Euclidean Algorithm, etc belong to Number Theory. As mentioned eariler, there are the solution to well-known problems such as Longest Common Subsequence, Edit Distance, Activity Selection Problems even if they ar enot explisitly specified by type.
This PS project is usefull, since it can improve the insight of algorithms. Additionally, some solutions in this repository have been used as a notes for tutoring undergraduates.
Type | Problem number |
---|---|
2-SAT | 11280, 11281 |
Arbitrary Precision / Big Integers | 1914, 10757 |
Arithmetic | 1712, 3046, 3052, 10250, 10757, 15596 |
Backtracking | 1038, 15649 |
Bellman–ford | 11657 |
Binary Search / Ternary Search | 1072, 1920, 7453, 7469 |
Bit Masking | 1094, 1285, 2087, 3056, 7620 |
Breadth-First Search | 1012, 1038, 1260, 1697, 2178, 2206, 2606, 2667, 3055, 7569, 7576, 11725, 12851, 16928 |
Brute-Force Algorithm | 1018, 1057, 1065, 1285, 1436, 1543, 2231, 2798, 3042, 4673, 7568, 16958 |
Case Work | 1002, 17387 |
Constructive | 2516, 18240 |
Convex Hull | 1708 |
Combinatorics | 1010, 3049, 11401 |
Data Structures | 1021, 1108, 1158, 1202, 1918, 1920, 1927, 1933, 1935, 2346, 7469, 10828, 11438, 15926, 18258 |
Depth-First Search | 1012, 1260, 2606, 2667, 11725 |
Deque | 1012 ,2346 |
Dijkstra's | 11569 |
Directed Acyclic Graph | 1108, 2252 |
Divide And Conquer | 1780, 1992, 2447, 2630 |
Dynamic Programming | 1003, 1010, 1149, 1904, 1912, 1932, 2156, 2169, 2216, 2300, 2305, 2533, 2550, 2565, 2579, 2775, 2839, 3056, 7620, 9184, 9251, 9461, 10844, 11053, 11054, 11726, 12865, 13398, 14002, 17831, 22348 |
Exponentiation By Squaring | 1629, 11401 |
Fermat's Little Theorem | 11401 |
Floyd–warshall | 1602, 11404, 16958 |
Geometry | 1002, 1004, 1085, 1708, 3009, 3042, 3053, 4153, 11758, 16958, 173861, 17387 |
Graph Theory | 1012, 1108, 1197, 1260, 1602, 1697, 2150, 2178, 2206, 2252, 2606, 2667, 3055, 5639, 7562, 7569, 7576, 9372, 11280, 11281, 11404, 11437, 11569, 11657, 11725, 12851, 16928, 16958, 18240 |
Graph Traversal | 1012, 1260, 2178, 2206, 2606, 2667, 3055, 5639, 7562, 7569, 7576, 11725, 12851, 16928, 18240 |
Greedy Algorithm | 1026, 1080, 1202, 1285, 1541, 1697, 1931, 2138, 2516, 2839, 3043, 11047, 11399, 13305 |
Hashing | 15829 |
Implementation | 1152, 1158, 1193, 2108, 2516, 2740, 2750, 2775, 3009, 3046, 3047, 3048, 3054, 4673, 7568, 10250, 10757, 10828, 10870, 10872, 15596, 15829, 17081, 25205, 25206 |
Knapsack | 12865 |
Line Segment Intersection Check | 17386, 17387 |
Linear Algebra | 2740 |
Longest Increasing Sequence | 2550 |
Lowest Common Ancestor | 10838, 11437, 11438, 13116 |
Mathematics | 1002, 1004, 1010, 1011, 1019, 1024, 1026, 1057, 1065, 1072, 1085, 1094, 1193, 1541, 1629, 1712, 1929, 1978, 2108, 2292, 2581, 2740, 2775, 2839, 2869, 3036, 3046, 3049, 3052, 3053, 4153, 4673, 4948, 9020, 9461, 10250, 10757, 10870, 10872, 11203, 11401, 11653, 13116, 15596, 25206 |
Meet In The Middle | 2087, 7453 |
Minimum Spanning Tree | 1197 |
Modular Multiplicative Inverse | 11401 |
Number Theory | 1929, 1978, 2581, 3036, 4948, 9020, 11401, 11653 |
Parsing | 1541 |
Prefix Sum | 22348 |
Priority Queue | 1202, 1927, 1933 |
Queue | 1158, 18258 |
Recursion | 1780, 1914, 1991, 1992, 2447, 2630, 5639, 9184, 11729 |
Segment Tree | 7469 |
Set / Map By Hashing | 1108 |
Shortest Path | 1602, 11404, 11657, 16958 |
Simulation | 3048, 17081 |
Sorting | 1026, 1181, 1202, 1427, 1920, 1931, 2108, 2300, 2750, 2751, 3043, 7453, 7469, 10814, 10989, 11399, 11650, 11651, 18870 |
Stack | 1918, 1935, 10828, 15926 |
String | 1152, 1181, 1427, 1541, 1543, 3048, 5525, 7620, 9251, 15829, 25205, 25206 |
Strongly Connected Component | 1108, 2150, 11280, 11281 |
Sparse Table | 11438 |
Sweeping | 1933 |
Topological Sorting | 1108, 2252 |
Tree | 1933, 1991, 2533, 5639, 9372, 10838, 11203, 11437, 11438, 11725, 13116, 17831, 18240 |
Two Pointer | 7453 |
Value / Coordinate Compression | 18870 |