All Projects → rossanoventurini → Competitiveprogramming

rossanoventurini / Competitiveprogramming

Page of the course "Competitive Programming and Contests" at Department of Computer Science, University of Pisa

Projects that are alternatives of or similar to Competitiveprogramming

Practical rl
A course in reinforcement learning in the wild
Stars: ✭ 4,741 (+3662.7%)
Mutual labels:  course-materials
Storytelling With Data
Course materials for Dartmouth Course: Storytelling with Data (PSYC 81.09).
Stars: ✭ 59 (-53.17%)
Mutual labels:  course-materials
Seai
CMU Lecture: Machine Learning In Production / AI Engineering / Software Engineering for AI-Enabled Systems (SE4AI)
Stars: ✭ 114 (-9.52%)
Mutual labels:  course-materials
Designcourse
Course materials for "Research Design in Political Science"
Stars: ✭ 12 (-90.48%)
Mutual labels:  course-materials
Dynamic Forms
🗂 Source code for the Dynamic Forms with Vue.js Course
Stars: ✭ 51 (-59.52%)
Mutual labels:  course-materials
Deeplearning2020
course materials for introduction to deep learning 2020
Stars: ✭ 90 (-28.57%)
Mutual labels:  course-materials
Mlcourse
Machine learning course materials.
Stars: ✭ 388 (+207.94%)
Mutual labels:  course-materials
Scala Course
Scala for Statistical Computing and Data Science Short Course
Stars: ✭ 118 (-6.35%)
Mutual labels:  course-materials
Ppd599
USC urban data science course series with Python and Jupyter
Stars: ✭ 1,062 (+742.86%)
Mutual labels:  course-materials
Learn Vuex
🗂Source code for the Vuex for Everyone course
Stars: ✭ 113 (-10.32%)
Mutual labels:  course-materials
2016learnpython
Python Teaching, Seminars for 2nd year students of School of Linguistics NRU HSE
Stars: ✭ 32 (-74.6%)
Mutual labels:  course-materials
Practical dl
DL course co-developed by YSDA, HSE and Skoltech
Stars: ✭ 1,006 (+698.41%)
Mutual labels:  course-materials
Py4e
Web site for www.py4e.com and source to the Python 3.0 textbook
Stars: ✭ 1,387 (+1000.79%)
Mutual labels:  course-materials
Awesome Startup
😎 All the required resources to build your own startup
Stars: ✭ 702 (+457.14%)
Mutual labels:  course-materials
Ml19 20a
CS 771A: Introduction to Machine Learning, IIT Kanpur, 2019-20-autumn offering
Stars: ✭ 115 (-8.73%)
Mutual labels:  course-materials
Uestc Course
电子科技大学资源共享平台, This repository contains the course materials of University of Electronic Science and Technology of China.
Stars: ✭ 452 (+258.73%)
Mutual labels:  course-materials
Course Computational Literary Analysis
Course materials for Introduction to Computational Literary Analysis, taught at UC Berkeley in Summer 2018, 2019, and 2020, and at Columbia University in Fall 2020.
Stars: ✭ 74 (-41.27%)
Mutual labels:  course-materials
Wa4e
Course materials for www.wa4e.com
Stars: ✭ 123 (-2.38%)
Mutual labels:  course-materials
Stanford Tensorflow Tutorials
This repository contains code examples for the Stanford's course: TensorFlow for Deep Learning Research.
Stars: ✭ 10,098 (+7914.29%)
Mutual labels:  course-materials
Cvessentials
Tutorial Series (60 hour course): Essentials of computer vision
Stars: ✭ 111 (-11.9%)
Mutual labels:  course-materials

Competitive Programming and Contests

  • Teacher: Rossano Venturini
  • CFU: 6
  • Period: First semester
  • Language: English
  • Classroom: here
  • Lectures schedule: Monday 14-16 and Wednesday 11-13 (Google Meet).
  • Question time: After lectures or by appointment
  • Google group to discuss solutions

Goals and opportunities

The goal of the course is to improve programming and problem solving skills of the students by facing them with difficult problems and by presenting the techniques that help their reasoning in the implementation of correct and efficient solutions. The importance of these skills has been recognized by the most important software companies worldwide, which evaluate candidates in their job interviews mostly by the ability in addressing such difficult problems (e.g., see here).

A natural goal is to involve the students in the intellectual pleasure of programming and problem solving, also preparing them for the most important international online contests, such as TopcoderCodeforcesHackerRank, CodeChef, Facebook Hacker Cup, Google Code Jam and so on, for internships in most important companies and their interviews. A desirable side-effect of the course could be to organize and prepare teams of students for online contests.

The course will provide the opportunity of

  • facing with challenging algorithmic problems;
  • improving problem solving and programming skills;
  • getting in touch with some big companies for internships, scholarships, or thesis proposals.

Exam

The exam consists of two parts: Homeworks 50% - Written/oral test 50%.

Extra points for

  • active participation to our Google group
  • serious participation to online contests, e.g., CodeForces, TopCoder, Hacker Rank, Google Code Jam, ...
  • successful interview with a big company

For full marks in the "Homeworks" part of the exam you must solve all the problems. I'll check your solutions by reading the code and their descriptions and by submitting them to the problems' sites. I should be able to submit any solution without any change. A solution that doesn't pass the tests (for any reason) will be considered wrong!

Please create a github repository to collect all your solutions and their descriptions. The repository can be either private or public. In both cases I should be able to access it. Please send me a link to your repository and keep the repository updated. I should be able to monitor your progresses.

The quality of your code will be evaluated. As your style will improve a lot with practice, I'll evaluate only the quality of the last submitted solutions.

Type Date Room Text
Written/Lab 23/01/2018 9:30 H Text, TestSet, and Solution
Written/Lab 14/02/2018 9:30 M Text, TestSet, and Quadratic solution
Written/Lab 12/06/2018 14:00 H Text, TestSet, and Solution
Written/Lab 06/07/2018 9:30 I Text and TestSet
Written/Lab 14/01/2019 14:00 H Text and TestSet

How to solve a problem

  • Read carefully the description of the problem.
  • Make sure you understand the problem by checking the examples.
  • Design a first trivial solution.
  • Think about a more efficient solution. The use of some running examples usually helps a lot in finding a better solution. If your are not able to find such solution, try to find some hints by discussing with other students, by asking questions on the group, by looking at the solution in our Web page, or by searching on internet. This is perfectly fine for the first problems and for most difficult ones. In any case, make sure you really understand the solution and the properties it is exploiting!
  • Write a brief description of your solution in English. Provide an analysis of its time and space complexity.
  • Implement your own solution in C++.
  • Submit your implementation to the problem's site. Fix it until it passes all the tests.
  • Always compare your solution and your implementation with existing ones.

Background

If you wish to refresh your mind on basic Algorithms and Data Structures, I suggest you to look at the well-known book Introduction to Algorithms, 3rd Edition by Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, Clifford Stein.

I strongly suggest you to watch the following video lectures as soon as possible.

References

  • Introduction to Algorithms,  3rd Edition, Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, Clifford Stein, The MIT Press, 2009 (Amazon) [CCLR]
  • Algorithms, 4th Edition, Robert Sedgewick, Kevin Wayne, Addison-Wesley Professional, 2011 (Amazon) [RS]
  • Algorithms, Sanjoy Dasgupta, Christos Papadimitriou, Umesh Vazirani, McGraw-Hill, 2006. (Amazon) [DPZ]
  • Programming Challenges: The Programming Contest Training Manual, Steven S. Skiena, Miguel A. Revilla, Springer, 2003 (Amazon) [SR]
  • Competitive Programming 4: The New Lower Bound of Programming Contests, Steven Halim, Felix Halim, (here) [HH]
  • Competitive Programmer's Handbook, Antti Laaksonen (here) [L]
  • The C++ Programming Language, 4th Edition, Bjarne Stroustrup, Addison-Wesley Professional, 2013 (Amazon)
  • A tour of C++, 2nd Edition, Bjarne Stroustrup, Addison-Wesley Professional, 2018 (Amazon)
  • The C++ Standard Library: A Tutorial and Reference, 2nd Edition, Nicolai M. Josuttis, Addison-Wesley Professional, 2012 (Amazon)

Useful links

Lectures

Date Lecture References Problems
14/09/2020 Introduction Slides Leaders in array (solution), Kadane's algorithm (solution), Missing number in array (solution), Trapping rain water (solution), and Sliding window maximum (solution)
16/09/2020 Solutions of Trapping rain water and Sliding window maximum Rossano's notes* Next larger element (solution), Towers (solution), and Finding Team Member (solution)
23/09/2020 Searching and Sorting: Binary Search, Merge Sort, QuickSort, Counting Sort, and Radix Sort Rossano's notes*. [CCLR] Chapters 2.3, 7, and 8. Binary search. Exponential search. Interpolation search (optional) Inversion count (solution) and The Monkey and the Oiled Bamboo
28/09/2020 Searching and Sorting: Binary Search, Merge Sort, QuickSort, Counting Sort, and Radix Sort Two Types of Spells
30/09/2020 Trees: representation, traversals, and Binary Search Tree Rossano's notes*. [CCLR] Chapters 10.4 and 12. Frogs and Mosquitoes
05/10/2020 Trees: representation, traversals, and Binary Search Tree Rossano's notes*. Tree traversals. Euler Tour. Two pointers technique. Maximum path sum (solution) and Longest k-Good Segment
12/10/2020 (Static) Prefix sum Rossano's notes* Ilya and Queries (solution), Number of ways (solution), and  Little girl and maximum sum (solution)
14/10/2020 (Static) Prefix sum contd.
19/10/2020 Prefix sum: Binary Indexed Tree (aka BIT or Fenwick tree) Rossano's notes*. BIT: descriptiontutorialvideo, visualgo, and code. Update the array (solution)
21/10/2020 Applications of BIT and Range update with BIT. Rossano's notes*. Range updates on BIT. Tutorial. Nested segments (solution) and Pashmak and Parmida's problem (solution)
26/10/2020 Segment Trees Segment Tree: description, tutorial 1, tutorial 2, tutorial 3, video, visualgo, slides and code. Solve Nested segments with Segment trees.
02/11/2020 Segment Trees: Lazy Propagation and Persistency Segment Tree: description, tutorial 1, tutorial 2, tutorial 3, video, visualgo, slides and code. Lazy propagation: tutorial and video. Circular RMQ
04/11/2020 Segment trees: Lazy Propagation and Persistency
09/11/2020 Exercises Triplets (Text and TestSet) and Smaller Values (Text and TestSet)
11/11/2020 Static RMQ with sparse table RMQ and sparse table: tutorial 1, tutorial 2, paper, and code. Static RMQ in 2n + o(n) bits and constant time(optional). RMQ with BIT (optional)
16/11/2020 Mo's algorithm on sequences and trees Rossano's notes*. Mo's Algorithm: Sequences and Trees Powerful array and Tree and queries
18/11/2020 Dynamic Programming: Fibonacci numbers, Rod cutting, and Longest common subsequence Rossano's notes* (or pdf). [CCLR] Chapter 15. Longest common subsequence
23/11/2020 Dynamic Programming: Minimum cost path, 0/1 Knapsack, Subset sum, and Coin change Rossano's notes* (or pdf). Minimum number of jumps
30/11/2020 Dynamic Programming: 0/1 Knapsack, fractional knapsack, and Subset sum. Rossano's notes* (or pdf). 0/1 knapsack problem: tutorial Subset sum and 0-1 knapsack
02/12/2020 Dynamic Programming: Longest increasing subsequence, Longest bitonic subsequence, Coin change, and Largest independent set on trees Rossano's notes* (or pdf) Longest increasing subsequence and Longest bitonic subsequence
07/12/2020 Dynamic Programming: Edit Distance, Longest palindromic subsequence, and Weighted job scheduling Rossano's notes* (or pdf) Edit distance, Vertex cover, and Longest palindromic subsequence
09/12/2020 Greedy algorithms: Activity Selection, Job sequencing, and Fractional knapsack problem Rossano's notes*. Notes by Jeff Erickson. Job sequencing. Fractional Knapsack Problem N meetings in one room, Magic numbers, Wilbur and array, and Alternative thinking

Last year lectures

Date Lecture References Problems
02/12/2019 Greedy Algorithms: Boxes and Hero Rossano's notes*. Boxes and Hero. Huffman code: Section 7.4 in Notes by Jeff Erickson (optional). Lexicographically maximum subsequence, Woodcutters, and Queue
03/12/2019 Graph algorithms: BFS, DFS, and Topological Sort Rossano's notes*. [CCLR] Chapter 22 X total shapes, IsBipartite, and Fox and names
09/12/2019 Graph algorithms: Strongly Connected Components and Single-Source Shortest Path Rossano's notes*. [CCLR] Chapters 22 and 23 Learning languages and Checkposts
10/12/2019 Graph algorithms: Minimum Spanning Tree (and Disjoint Sets data structures) Rossano's notes*. [CCLR] Chapters 21 and 23. Kruskal: code, Disjoint Set: tutorial Minimum spanning tree

Lectures from past years

Date Lecture References Problems
2017 Simulation of the exam Misha and forest
2018 Centroid Decomposition of trees Centroid Decomposition of trees: here, here, here, and here
2018 String algorithms: Knuth-Morris-Pratt and Suffix array Knuth-Morris-Pratt from [CLRS] Chapter 32.3. Knuth-Morris-Pratt. Optional: Rabin-Karp here from Algorithms on strings, trees, and sequences, D. Gusfield, Cambridge university press, here, and here. Suffix Array: Tutorial and implementation: here and here. Optional: Suffix Array in linear time here Longest prefix suffix and Shift the string
2018 String algorithms: LCP array, trie and ternary search trie Computing LCP array: Kasai et al.'s algorithm and here. Ternary search trie and a video.
2019 Standard Template Library (STL) Slides. Tutorial and STL algorithms Megacity (solution), Find pair (solution), and Two heaps (solution)
2019 Standard Template Library (STL). Coding Slides
2019 Heavy-light Decomposition of trees. This lecture is not mandatory. Heavy-light Decomposition of trees: here, here, and here. QTREE, QTREE2, QTREE3, GOT, and Chef and the tree.

* Notes marked with "Rossano's notes" are rough and non-exhaustive notes that I used while lecturing. Please use them just to have a list of the topics of each lecture and use other reported references to study these arguments.

Further (optional) topics

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].