Skip to content

topic and difficulty wise problems and solutions with different approaches of time complexity 😎

Notifications You must be signed in to change notification settings

Geek-a-Byte/Competitive-Programming

Repository files navigation

Codebase

Timeline

- Recursion and Backtracking
- STL
- Binary Search
- Number Theory
- Sqrt Decomposition
- Kmp,Hashing,Trie
- Segment tree and lazy propagations
- Range Minimum Query
- Sparse Table
- Basic DP,LCS,Coin Change,Knapsack,LIS/LDS in nlogn
- Digit DP
- BFS,DFS,Dijkstra,Bellmanford,Floyd Warshall
- Topological Sorting
- MST ( Prims, Kruskal )
- Disjoint set/Union Find
- Game theory
- Basic combinatorics(stars and bars)

memory constraint

  • log2(10^9) = 29.9 = 30 bit = int/float (32b/4B)
  • log2(10^10) = 33 bits = long long int/double (64b/8B)
  • log2(10^18) = 60 bits = long long int

template

#include <bits/stdc++.h>
using namespace std;

#define fast                          \
    ios_base::sync_with_stdio(false); \
    cin.tie(NULL)
#define read freopen("input.txt", "r", stdin);
#define write freopen("output.txt", "w", stdout);
#define IO read write
#define TC     \
    int tc;    \
    cin >> tc; \
    for (int cn = 1; cn <= tc; ++cn)

#define int long long
#define ll long long int
#define ull unsigned long long int
#define ui unsigned int
#define ld long double

#define pii pair<int, int>
#define stlloop(x) for (__typeof(x.begin()) it = x.begin(); it != x.end(); it++)
#define CLR(p) memset(p, 0, sizeof(p))
#define sp(x) std::cout << std::fixed << std::setprecision(x)

#define gcd(a, b) __gcd(a, b)
#define lcm(a, b) ((a)*(b))/gcd(a, b)

#define PI acos(-1)
#define N 10000000
const int INF = 0x3f3f3f3f;
const int mod = 100000007;


void fileOJ()
{
#ifndef ONLINE_JUDGE
    IO
#endif
}

signed main()
{
    fast;
    // fileOJ();
    int ans=1;
    TC{
        sp(0);
        cout<<"Case "<<cn<<": ";
        sp(4);
        cout<<ans<<endl;
    }
}

Recursion and Backtracking

Number theory

Useful Resources

Target

cf blogs

About

topic and difficulty wise problems and solutions with different approaches of time complexity 😎

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages