Skip to content

Instantly share code, notes, and snippets.

View sumedhaagarwal's full-sized avatar
🌴
On vacation

Sumedha Agarwal sumedhaagarwal

🌴
On vacation
View GitHub Profile
#include <bits/stdc++.h>
using namespace std;
#include<map>
#define REP(i,a,b) for(int i=a;i<b;i++)
#define NREP(i,a,b) for(int i=a;i>=b;i--)
#define clr(a) memset(a,0,sizeof a)
#define CLR(a,t) memset(a,t,sizeof a)
#define help ios::sync_with_stdio(0)
#define SORTV(a,n) sort(a.begin(),a.begin()+n)
#define SORTA(a,n) sort(a,a+n)
#include<bits/stdc++.h>
using namespace std;
#define mp make_pair
vector<string> buildings;
string buildingName,commandArg2,commandArg1,floorName,roomID;
map<string,vector<string> > floors;
map<pair<string,string>, vector<string> > confRooms;
int slotSt,slotEnd;
map<string,int> booked;
map<string,vector<pair<pair<int,int>,string> > > bookedSlots;
#include <bits/stdc++.h>
using namespace std;
int bitVector,mask;
string str;
bool powerof2(int x){
return (x&(x-1))==0;
}
#include <bits/stdc++.h>
using namespace std;
vector<int> firstCombination,secondCombination;
int noOf2lenBricks;
void findFirstForEvenLen(int length){
//fill firstCombination with all 2X1 bricks
noOf2lenBricks=length/2;
for(int i=0;i<noOf2lenBricks;i++)