Skip to content

Instantly share code, notes, and snippets.

View paramsingh's full-sized avatar

param paramsingh

View GitHub Profile
#include <bits/stdc++.h>
using namespace std;
// E -> E + E
// E -> E * E
// E -> (E)
// E -> x
vector<char> st;
string str;
create table left1 (
id int primary key,
hello varchar(255) not null,
fdasj varchar(255) not null
);
create table right1 (
id int primary key,
hello varchar(255) not null,
fdasj varchar(255) not null
#include <bits/stdc++.h>
using namespace std;
struct production {
int n;
string left;
string right[10];
} rules[100];
void print_rule(int id) {
#include <bits/stdc++.h>
using namespace std;
struct rule {
int left;
int n;
int right[10];
} rules[10];
int parse[10];
http://infolab.stanford.edu/~hector/cs245/notes.htm
" enable syntax highlighting
syntax enable
" show line numbers
set number
" set tabs to have four spaces
set tabstop=4
set softtabstop=4
#include <bits/stdc++.h>
using namespace std;
class process {
public:
int id, a, b, w, r;
};
int main(void) {
#include <bits/stdc++.h>
#define mp make_pair
using namespace std;
typedef pair<int, int> pii;
int done[1000100] = {0};
int visited[1000100] = {0};
int level[1000100] = {0};
vector<int> graph[1000100];
#include <bits/stdc++.h>
using namespace std;
class cow {
public:
int milk, time;
} cows[10010];
bool cmp(const cow& a, const cow& b) {
if (a.milk == b.milk)
#include <stdio.h>
#include <stdlib.h>
int main(void) {
char alphabet[26];
int pos[26];
int n, m;
int i, j;
for (i = 0; i < 26; i++) {
alphabet[i] = 'a' + i;