This file contains hidden or 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> | |
using namespace std; | |
// E -> E + E | |
// E -> E * E | |
// E -> (E) | |
// E -> x | |
vector<char> st; | |
string str; |
This file contains hidden or 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
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 |
This file contains hidden or 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> | |
using namespace std; | |
struct production { | |
int n; | |
string left; | |
string right[10]; | |
} rules[100]; | |
void print_rule(int id) { |
This file contains hidden or 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> | |
using namespace std; | |
struct rule { | |
int left; | |
int n; | |
int right[10]; | |
} rules[10]; | |
int parse[10]; |
This file contains hidden or 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
http://infolab.stanford.edu/~hector/cs245/notes.htm |
This file contains hidden or 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
" enable syntax highlighting | |
syntax enable | |
" show line numbers | |
set number | |
" set tabs to have four spaces | |
set tabstop=4 | |
set softtabstop=4 |
This file contains hidden or 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> | |
using namespace std; | |
class process { | |
public: | |
int id, a, b, w, r; | |
}; | |
int main(void) { |
This file contains hidden or 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 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]; |
This file contains hidden or 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> | |
using namespace std; | |
class cow { | |
public: | |
int milk, time; | |
} cows[10010]; | |
bool cmp(const cow& a, const cow& b) { | |
if (a.milk == b.milk) |
This file contains hidden or 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 <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; |