Skip to content

Instantly share code, notes, and snippets.

View dipta10's full-sized avatar

Sourav (Dipta) Das dipta10

View GitHub Profile
@dipta10
dipta10 / cloudSettings
Last active May 28, 2021 16:46
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-05-28T16:46:45.340Z","extensionVersion":"v3.4.3"}
/*
* Created by Dipta Das on 23-11-2018
* Title: Binary Indexed Tree/Fenwich Tree
* Editorial
* https://www.topcoder.com/community/competitive-programming/tutorials/binary-indexed-trees/
* http://www.shafaetsplanet.com/?p=1961&fbclid=IwAR23aI879JfPHbIaW3y93Du6Ql_68DCTxcUY6euLJUWsLvgtvj_-b2tKJCE
* https://www.geeksforgeeks.org/binary-indexed-tree-or-fenwick-tree-2/
* https://www.youtube.com/playlist?list=PLDV1Zeh2NRsCvoyP-bztk6uXAYoyZg_U9
* https://www.hackerearth.com/practice/notes/binary-indexed-tree-or-fenwick-tree/
* Source Code: https://gist.github.com/dipta10/8bdc77376027ed3d5b81e90436a8d5bd
/*
* Created by Dipta Das on 23-11-2018
* Title: Segment Tree Lazy Propagation
* Artical by Shafayet Bhai: http://www.shafaetsplanet.com/planetcoding/?p=1591, http://www.shafaetsplanet.com/?p=1557
* Solution: https://gist.github.com/dipta10/ac694515d7370ce3ae56754a8a3f119e
* Comments:
*/
#include <bits/stdc++.h>
#include <stdio.h>
// Created by Dipta Das on 8/11/18.
// Problem link: http://codeforces.com/contest/1016/problem/A
// Solution link: https://gist.github.com/dipta10/aae2a8e8d1743911f1075ab9f9568165/
#include <stdio.h>
#include <iostream>
using namespace std;
typedef long long ll;
typedef unsigned long long llu;
/*
* Name: Shift The String
* Created by Dipta Das on 09-11-18
* Problem Link: https://www.codechef.com/problems/TASHIFT
* solution: https://gist.github.com/dipta10/3b94ced5e21649275087721a09a6e741
* Editorial: https://discuss.codechef.com/questions/48550/tashift-editorial
*/
#include <bits/stdc++.h>
#include <stdio.h>
/*
* Created by Dipta Das on 09-11-18
*/
#include <bits/stdc++.h>
#include <stdio.h>
#define fin freopen("input", "r", stdin)
using namespace std;
@dipta10
dipta10 / .bash_profile
Last active November 16, 2021 17:36
Environment Setup: Vim, Tmux, Zsh, Vifm.
PATH=/opt/local/bin:$PATH
export PATH=/usr/local/bin:$PATH
source ~/.bashrc
#source ~/.vimrc
#source ~/.tmux.conf
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
/*
* SPOJ: ONEZERO - Ones and zeros
* Find the smallest binary digit multiple of given number
* Link:https://www.spoj.com/problems/ONEZERO/en/
* Editorial: https://www.geeksforgeeks.org/find-the-smallest-binary-digit-multiple-of-given-number/
* Solution:
*
*/
#include <stdio.h>
/*
* CodeChef TAAND
* link: https://www.codechef.com/problems/TAAND
* editorial: https://discuss.codechef.com/questions/48551/taand-editorial
*/
#include <stdio.h>
#include <bits/stdc++.h>
#define fin freopen("input", "r", stdin)
#include <vector>
@dipta10
dipta10 / SPOJ COMDIV.cpp
Last active November 7, 2018 16:31
Number Theory Review #1 by Solving SPOJ, UVA Problems (Bangla | বাংলা)
/*
* link: https://www.spoj.com/problems/COMDIV/
* HINT: USE scanf, printf or use fast I/O
* HINT: numberOfCommonDiv = numberOfCommonDiv(gcd(n1, n2))
* You can use __gcd(), it will work in GNU.
* You will be given T (T<=10^6) pair of numbers. All you have to tell is the number of common divisors between two numbers in each pair.
*/
#include <bits/stdc++.h>