These are my solutions for SGU Problems. I am trying to make it complete as soon as possible.
SGU is the one of the best sources for starting Competitive Programming for these reasons:
- Efficiency: More efficient to learn new ideas since the problems are less repetitive comparing with sources such as Topcoder, CF problemset.
- Respectable Problemsetters: The problems are directly designed and selected by experienced coaches and competitive programmers such as Andrew Stankevich, Mike Mirzayanov, ...
- Comprehensive Ideas: You can find many different ideas in the SGU's problems, which you can hardly found those ideas in other sources.
- Classical Ideas: Many of classical problems and ideas can be found here which are not used in public contests since it may be repetitive for some contestants. Usually these kinds of idea are basis of many solution for other problems.
- Ease of Use: You can easily submit and see the verdict of solution in the great platform of Codeforces.
I have tried my best to write codes self declarative and clean, but in case you have any problem in understanding a solution, do not hesitate and send an email to miladrzh@gmail.com.
Please do not copy the solutions. You earn nothing with copying, and also you lose a chance to learn a new idea.
I have prepared this section to help Coaches/Teachers/TAs to help them find proper assignments for their students. I please students to do not look at this section since it may spoil the solution for you, for example, if you know a problem is graph matching, the problem becomes much easier and loses its value.)
Problem Number | Tag | Other Info |
---|---|---|
100 | Implementation | |
102 | Simple Math | |
105 | Simple Math | |
112 | Bignum | |
113 | Number Theory | |
114 | Greedy, Sorting | |
115 | Ad Hoc, Implementation, Calendar | |
118 | Simple Math | |
123 | Implementation | |
126 | Implementation, Math | |
127 | Implementation | |
130 | Combinatorics | |
133 | Sweep line, Sorting, Greedy | |
135 | Combinatorics | |
143 | Dynamic Programming, DFS/BFS, Trees | |
144 | Probabilities, Math | |
149 | Trees, DFS/BFS | |
154 | Binary Search, Simple Math | |
160 | Dynamic Programming | Creating the update path in a dp problem |
170 | Greedy | |
172 | DFS, Graphs | |
175 | Divide and Conquer, Constructive Algorithm | |
180 | Divide and Conquer, Sorting | Favorite problem |
184 | Implementation | |
222 | Combinatorics | |
224 | Backtrack, Brute Force | |
226 | BFS | |
231 | Sieve of Eratosthenes, Number Theory | |
271 | Data Structures, Linked List | Good Homework for Data Structure Course :) |
276 | Implementation | |
297 | Implementation | |
299 | Bignum, Simple Math | |
302 | Data Structures, Stack | |
310 | Bitmask | Favorite Problem |
321 | Trees, Greedy, DFS/BFS | Favorite Problem |
344 | DFS/BFS | |
358 | Sorting | |
374 | Bignum, Simple Math | |
375 | Binary Problems, Math | |
397 | Data Structures, Linked List | |
398 | Implementation | |
403 | Implementation | |
404 | Simple Math | |
460 | Implementation | |
486 | Implementation | |
499 | Simple Math | |
538 | Implementation | |
546 | Implementation | |
551 | Implementation |
Your pull requests are welcomed. Whether a refactor to existing codes or a new solution.