Skip to content

Instantly share code, notes, and snippets.

View swapnil-warke's full-sized avatar
:octocat:
I may be slow to respond.

swapnil-warke

:octocat:
I may be slow to respond.
View GitHub Profile
@swapnil-warke
swapnil-warke / tmux-cheatsheet.markdown
Created February 3, 2016 05:29 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@swapnil-warke
swapnil-warke / .vimrc
Created November 25, 2015 07:41 — forked from rocarvaj/.vimrc
Minimal .vimrc for C/C++ developers
" VIM Configuration File
" Description: Optimized for C/C++ development, but useful also for other things.
" Author: Gerhard Gappmeier
"
" set UTF-8 encoding
set enc=utf-8
set fenc=utf-8
set termencoding=utf-8
" disable vi compatibility (emulation of old bugs)
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
template <typename T>
void remove_duplicates(std::vector<T>& vec)
{
std::sort(vec.begin(), vec.end());
vec.erase(std::unique(vec.begin(), vec.end()), vec.end());
}
@swapnil-warke
swapnil-warke / spoj2530.cpp
Last active December 24, 2015 03:39
M4TILE related to spoj 3883 try M5TILE on spoj(11719) after this
//spoj2530.cpp
#include <cstdio>
using namespace std;
//my code
int main(){
unsigned int x[1001],a[1001],b[1001];
x[0]=1;a[0]=b[0]=0;
x[1]=a[1]=b[1]=1;
@swapnil-warke
swapnil-warke / M3TILE.cpp
Created September 28, 2013 06:05
spoj 3883 , poj 2663 just divide the problem into different sub problems and hv recurrence relation for all and solve bottom up
/*
** id :template
** author : swap_coder
** time:
*/
//also 3883 spoj
#include<vector>
#include<algorithm>
#include<cstdio>
@swapnil-warke
swapnil-warke / uva10940.cpp
Created September 27, 2013 15:34
Uva 10940 Throwing cards Josephs problem
#include<vector>
#include<algorithm>
#include<cstdio>
#include<cstring>
#include<cmath>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
@swapnil-warke
swapnil-warke / mergesort.cpp
Created August 1, 2013 18:55
basic code supposed to be ur library code
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstdlib>
using namespace std;
typedef long long ll;
template <class T>
@swapnil-warke
swapnil-warke / uva583.cpp
Created August 1, 2013 18:49
prime factor
/*
** id :template
** author : swap_coder
** time:
*/
#include<vector>
#include<algorithm>
#include<cstdio>
@swapnil-warke
swapnil-warke / uva10810.cpp
Created July 31, 2013 19:00
counting inversions same as uva11495
#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstdlib>
using namespace std;
typedef long long ll;