Skip to content

Instantly share code, notes, and snippets.

View manish1997's full-sized avatar
🎧
.

Manish Kumar manish1997

🎧
.
View GitHub Profile
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define s second
#define f first
#define fast_in std::ios::sync_with_stdio(false);
#define fast_cin fast_in; ios_base::sync_with_stdio(false); cin.tie(NULL);
string s;
ll n,a,b;
{
"cmd": ["g++.exe", "${file}", "-o", "${file_base_name}.exe", "&&", "${file_base_name}.exe<inputf.in>outputf.in"],
"shell":true,
"path": "C:\\MinGW\\bin",
"working_dir":"$file_path",
"selector":"source.c"
}
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define fast_in std::ios::sync_with_stdio(false);
#define fast_cin fast_in; ios_base::sync_with_stdio(false); cin.tie(NULL);
int main(){
fast_cin;
int n; //length of given string
string str; //given string
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define s second
#define f first
#define fast_in std::ios::sync_with_stdio(false);
#define fast_cin fast_in; ios_base::sync_with_stdio(false); cin.tie(NULL);
//Sieve
#define sieveMax 50000 //maximum for which u need primality test
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define fast_in std::ios::sync_with_stdio(false);
#define fast_cin fast_in; ios_base::sync_with_stdio(false); cin.tie(NULL);
int main(){
fast_cin;
int n;cin>>n;
string s;cin>>s;
if(n==1){
#include <iostream>
#include <cstring>
using namespace std;
#define ll long long
int main(){
int n,m;
cin >> n >> m;
string s,t;
cin>>s>>t;
bool nostar=true;
#include <iostream>
#include <cstring>
#include <stack>
using namespace std;
#define ll long long
int main(){
ll n,k;
cin>>n>>k;
string s;cin>>s;
ll torem=n-k; //pairs to be deleted * 2
@manish1997
manish1997 / div2_151D.cpp
Last active August 17, 2018 21:24
gistsForBlog/div2_151D.cpp
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i, start, end) for(ll i=start; i<end; i++)
#define MAX 100005
unordered_map<int,bool> nodes[MAX];
int n,m;
int c[MAX];
int main(){
@manish1997
manish1997 / Div2_143D.cpp
Last active August 17, 2018 12:27
For Codeforces Round #143 D
#include <iostream>
#include <cstring>
using namespace std;
#define ll long long
int main(){
ll faceValues[6];
ll observerCoordinate[3];
ll endPoints[3];
for(int i=0; i<3; i++) cin>>observerCoordinate[i];
for(int i=0; i<3; i++) cin>>endPoints[i];