This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
#include<stdio.h> | |
#include<conio.h> | |
#include<windows.h> | |
#include<vector> | |
#include<time.h> | |
#define X 116 | |
#define Y 28 | |
using namespace std; | |
void gotoxy(short x, short y){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Onkar J Sathe | |
#include <bits/stdc++.h> | |
#include <graphics.h> | |
using namespace std; | |
#define Mx getmaxx() | |
#define My getmaxy() | |
#include <dos.h> | |
#include <windows.h> | |
int main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<bits/stdc++.h> | |
#define ll long long | |
#define vll vector<ll> | |
#define sll set<ll> | |
#define mll map<ll,ll> | |
#define MOD 1000000007 | |
#define fo(i,m,n) for(i=m;i<n;i++) | |
#define fore(i,m,n) for(i=m;i>=n;i--) | |
using namespace std; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <bits/stdc++.h> | |
#include <ext/pb_ds/assoc_container.hpp> | |
#include <ext/pb_ds/tree_policy.hpp> | |
using namespace std; | |
using namespace __gnu_pbds; | |
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> pbds; | |
int main(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ll power(ll x, ll y, ll p) | |
{ | |
ll res = 1; | |
x = x % p; | |
while (y > 0) | |
{ | |
if (y & 1) | |
res = (res*x) % p; | |
y = y>>1; | |
x = (x*x) % p; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ll modularExponentiation(ll x,ll n,ll M) | |
{ | |
ll result=1; | |
while(n>0) | |
{ | |
if(n % 2 ==1) | |
result=(result * x)%M; | |
x=(x*x)%M; | |
n=n/2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef long long ll; | |
inline fastRead() | |
{ | |
register char ch=0; | |
while (ch<33) ch=getchar(); | |
ll x=0; | |
while (ch>33) | |
{ | |
x=x*10+ch-'0'; | |
ch=getchar(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// max heap | |
priority_queue <ll> max_heap; // by defualt priority_queue is maxheap always. | |
// min heap | |
priority_queue <ll, vector<ll>, greater<ll> > min_heap; | |
// type, container, comparator function | |
typedef struct mystruct { | |
ll one; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First, check out the commit you wish to go back to (get sha-1 from git log) | |
git reset --hard 9d3c3a0caa7f7b35ef15adb96fc80fcbb59ac72a | |
# Then do a forced update. | |
git push origin +9d3c3a0caa7f7b35ef15adb96fc80fcbb59ac72a^:develop | |
# Push specific commit | |
git push origin 9d3c3a0caa7f7b35ef15adb96fc80fcbb59ac72a:develop -f |