/competitive-programming

From UVA, CODEFORCES, OBI, ACM-IPC, ADVENT-OF-THE-CODE

Primary LanguageC++

CP - COMPETITIVE_PROGRAMMING

Here are some resolutions of competitive programming. I like to do this problems to improve my skills coding, distract from the dayly tasks. Note, this code is really messy up, since is done only to be 'accepted".

Algorithms and Applications

The link of the problems is commented first line of each code. The sections are splitted by Event (Advent of Code, Daily Byte and etc) and by theme (Greedy, DP and etc). If there are more than one solution, then it will be chained as follow: [1][2]. Sometime, the complexity time is given in the link, instead of enumerating [O(n)][O(nlogn)]./p>

  • Advent of the Code 2020 | 2021 solutions

    Cool challenges in increase difficulty order, summer challenges.

  • Daily Byte solutions

    Every day a learning day.

    • [1] Range Sum
    • [1] [2] Longest Increase Sequence
    • [1] Weithed Interval Schedule Problem
    • [1] Knapsack
    • [1] Coin Change

    Pratice DP

    • [1] [2] [3] Véi, dá meu troco! - (DP - Coins)
    • [1][2] Formas de me dar meu dinheiro! (ways to count) (DP - Coin)
    • [1] UVA 507 Jill Rides Again - (DP - Sum Range)
    • [1] OBI 2014 Letra - (DP - LIS)
    • [1] UVA 10534 - Wavio Sequence (DP - LIS)
    • [1] OBI 2007 Pizza - (DP - Sum Range)
    • [1] O(n²) - [2] O(n log n) UVA 10131 is bigger smarter?- (DP - LIS)
    • [1] O(n*m) DNA Sequence Alignment (DP - String)
    • [1] O(n²) OBI 2005 Pedido de desculpas - (DP - Knapsack)
    • [1] O(n²) UVA 10616 Sum Divisble by n chosen m - (DP - Knapsack)
  • Strings - Strings in CP

    Pratice Strings

    • [1][2] OBI Fusões - Guildas (Graph - Union Find)
  • Pratice Graphs

    • [1][2] OBI Fusões - Guildas (Graph - Union Find)
    • [1] CODEFORCES 69 - C - new Distribution (Graph - DFS or Union Find)
    • [1] OBI 2016 - Taco do Saci (Graph - DFS)
    • [1] O(|V| + |E|) OBI 2011 - Escalonamento Ótimo (Graph - Ordenação Topológica)
    • [1] O(|M| log |N|) OBI - Copa do Mundo 2014 (Kruskal - MST)
    • [1] O(|V| * |E|) UVA 558 - Wormholes (Graph - Negative Cycles)
    • [1] CODEFORCES 617 - E - String Coloring, Easy Version (Graph - Bipartite)
    • [OBI- 2010 - Reuniao] Floyd Warshall
  • Greedy / Brute Force Problems

  • DATA STRUCTURE

    • [1] STL 1 (vector, queue, stack, pair)
    • [1] STL 2 (map, set, tree)
    • [1] [2] Bits (Bits)
    • [1] Binary Search Tree
    • [1] Segmented tree (seg Tree)

    Pratice

    • [1] OBI 2016 - Times (Vectors and Pairs)
    • [1] OBI 2014 - Fila (Bits)
    • [1] CODEFORCES DIV3 570 - D Computer Game (Binary Search)
    • [1] UVA 540 Team Queue (Map)
    • [1] UVA 837 Light and Transparencies (Map, Set)
    • [1] OBI Banco (Priority Queue)
    • [1] U(n log n) OBI Banco (Binary Search)