Static Public Member Functions | |
static void | dump (bool v) |
static void | dump (double v) |
static void | dump (int v) |
static void | dump (string v) |
static void | dump (vector< char * > &v) |
static void | dump (vector< const char * > &v) |
static void | dump (const vector< double > &v) |
static void | dump (const vector< TreeNode * > &v) |
static void | dump (const TreeNode *v) |
static void | dump (const vector< TreeLinkNode * > &v) |
static void | dump (const TreeLinkNode *v) |
static void | dump (const ListNode *v) |
static void | dump (const vector< ListNode * > &v) |
static void | dump (const vector< int > &v) |
static void | dump (const int *v, const int size) |
static void | dump (const vector< int * > &v, const vector< int > v_size) |
static void | dump (const Interval &v) |
static void | dump (const vector< Interval > &v) |
static void | dump (const vector< vector< Interval > > &v) |
static void | dump (const vector< string > &v) |
static void | dump (const vector< vector< int > > &v) |
static void | dump (const vector< vector< string > > &v) |
static void | dump (const set< string > &v) |
static void | dump (const vector< set< string > > &v) |
static void | dump (const vector< char > &v) |
static void | dump (const vector< vector< char > > &v) |
static void | dump (const vector< vector< vector< char > > > &v) |
static bool | equal (bool a, bool b) |
static bool | equal (double a, double b) |
static bool | equal (int a, int b) |
static bool | equal (string a, string b) |
static bool | equal (const ListNode *a, const ListNode *b) |
static bool | equal (const vector< ListNode * > &a, const vector< ListNode * > &b) |
static bool | equal (vector< ListNode * > a, vector< ListNode * > b, bool _sort) |
static bool | equal (const TreeNode *a, const TreeNode *b) |
static bool | equal (vector< TreeNode * > &a, vector< TreeNode * > &b) |
static bool | equal (vector< TreeNode * > a, vector< TreeNode * > b, bool _sort) |
static bool | equal (const TreeLinkNode *a, const TreeLinkNode *b) |
static bool | equal (vector< TreeLinkNode * > &a, vector< TreeLinkNode * > &b) |
static bool | equal (vector< TreeLinkNode * > a, vector< TreeLinkNode * > b, bool _sort) |
static bool | equal (Interval &a, Interval &b) |
static bool | equal (vector< Interval > &a, vector< Interval > &b) |
static bool | equal (vector< Interval > a, vector< Interval > b, bool _sort) |
static bool | equal (vector< vector< Interval > > &a, vector< vector< Interval > > &b) |
static bool | equal (vector< vector< Interval > > a, vector< vector< Interval > > b, bool _sort) |
static bool | equal (vector< int > &a, vector< int > &b) |
static bool | equal (vector< int > a, vector< int > b, bool _sort) |
static bool | equal (vector< string > a, vector< string > b) |
static bool | equal (vector< string > a, vector< string > b, bool _sort) |
static bool | equal (vector< vector< int > > &a, vector< vector< int > > &b) |
static bool | equal (vector< vector< int > > a, vector< vector< int > > b, bool _sort) |
static bool | equal (vector< vector< string > > a, vector< vector< string > > b) |
static bool | equal (vector< vector< string > > a, vector< vector< string > > b, bool _sort) |
static bool | equal (const set< string > &a, const set< string > &b) |
static bool | equal (vector< set< string > > &a, vector< set< string > > &b) |
static bool | equal (vector< set< string > > a, vector< set< string > > b, bool _sort) |
static void | explode (vector< string > &in, const string &str, const char &ch) |
static string | ltrim (const string s) |
static void | read (const string &input, vector< char * > &in) |
static void | read (const string &input, vector< const char * > &in) |
static void | read (const string &input, vector< double > &in) |
static void | read (const string &input, vector< int > &in) |
static void | read (const string &input, vector< int * > &in, vector< int > &in_size) |
static void | read (const string &input, vector< ListNode * > &in) |
static void | read (const string &input, vector< string > &in) |
static void | read (const string &input, vector< TreeLinkNode * > &in) |
static void | read (const string &input, vector< TreeNode * > &in) |
static void | read (const string &input, vector< set< string > > &in) |
static void | read (const string &input, vector< vector< int > > &in) |
static void | read (const string &input, vector< vector< Interval > > &in) |
static void | read (const string &input, vector< vector< string > > &in) |
static void | read (const string &input, vector< vector< vector< char > > > &in) |
static string | rtrim (const string s) |
static void | sort_deep (vector< vector< Interval > > &a) |
static void | sort_deep (vector< vector< int > > &a) |
static void | sort_deep (vector< vector< string > > &a) |
static void | sort_vec (vector< ListNode * > &a) |
static void | sort_vec (vector< TreeNode * > &a) |
static void | sort_vec (vector< TreeLinkNode * > &a) |
static void | sort_vec (vector< Interval > &a) |
static void | sort_vec_vec (vector< vector< Interval > > &a) |
static void | sort_vec_vec (vector< vector< int > > &a) |
static void | sort_vec_vec (vector< vector< string > > &a) |
static string | trim (const string s) |
The OJ class includes utility functions to:
|
inlinestatic |
Compare a and b, sort before comparing.
Copies of a and b are used in sorting, the originals are not changed.
Compare a and b, sort before comparing if _sort is true.
Copies of a and b are used in sorting, the originals are not changed.
Compare a and b, sort before comparing.
Copies of a and b are used in sorting, the originals are not changed.
Compare a and b, sort before comparing if _sort is true.
Copies of a and b are used in sorting, the originals are not changed.
|
inlinestatic |
Compare a and b, sort before comparing.
Copies of a and b are used in sorting, the originals are not changed.
|
inlinestatic |
Compare a and b, sort before comparing if _sort is true.
Copies of a and b are used in sorting, the originals are not changed.
Compare a and b, sort before comparing.
Copies of a and b are used in sorting, the originals are not changed.
Compare a and b, sort before comparing if _sort is true.
Copies of a and b are used in sorting, the originals are not changed.
|
inlinestatic |
Compare a and b, sort (on first level) before comparing.
Copies of a and b are used in sorting, the originals are not changed.
|
inlinestatic |
Compare a and b, sort (on first level) before comparing if _sort is true.
Copies of a and b are used in sorting, the originals are not changed.
|
inlinestatic |
Compare a and b, sort before comparing.
Copies of a and b are used in sorting, the originals are not changed.
|
inlinestatic |
Compare a and b, sort (on first level) before comparing if _sort is true.
Copies of a and b are used in sorting, the originals are not changed.
|
inlinestatic |
Compare a and b, sort before comparing.
Copies of a and b are used in sorting, the originals are not changed.
|
inlinestatic |
Compare a and b, sort before comparing if _sort is true.
Copies of a and b are used in sorting, the originals are not changed.
|
inlinestatic |
Compare a and b, sort (on first level) before comparing.
Copies of a and b are used in sorting, the originals are not changed.
|
inlinestatic |
Compare a and b, sort (on first level) before comparing if _sort is true.
Copies of a and b are used in sorting, the originals are not changed.
|
inlinestatic |
Compare a and b, sort (on first level) before comparing.
Copies of a and b are used in sorting, the originals are not changed.
|
inlinestatic |
Compare a and b, sort (on first level) before comparing if _sort is true.
Copies of a and b are used in sorting, the originals are not changed.
|
inlinestatic |
Set uses internal (unspecified) order. If two sets have the same elements, the order should be the same.
|
inlinestatic |
Compare a and b, sort (on first level) before comparing.
Copies of a and b are used in sorting, the originals are not changed.
|
inlinestatic |
Compare a and b, sort (on first level) before comparing if _sort is true.
Copies of a and b are used in sorting, the originals are not changed.
|
inlinestatic |
Split a given string str by ch, store results in vector in.
|
inlinestatic |
Remove spaces from the left side of input string.
|
inlinestatic |
Each input value is delimited by "|". Allows empty string. Spaces are not trimmed.
|
inlinestatic |
Each input value is delimited by "|". Allows empty string. Spaces are not trimmed.
|
inlinestatic |
Each input value is delimited by "|".
Spaces will be trimmed.
Empty value is not allowed (will be ignored).
|
inlinestatic |
Each input value is delimited by "|".
Spaces will be trimmed.
Empty value is not allowed (will be ignored).
|
inlinestatic |
Spaces are trimmed.
Each input value is delimited by "|" on the first level, which represents an array of integers. An empty string represents an empty int array.
Each input value is delimited by "," on the second level, which represents an int value in an int array. Any empty string is ignored.
|
inlinestatic |
Spaces are trimmed.
Each input value is delimited by "|" on the first level, which represents a linked list of integers. An empty string represents an empty tree.
Each input value is delimited by "," on the second level, which represents the int value of a node in a linked list. Any empty string is ignored.
|
inlinestatic |
Each input value is delimited by "|".
Spaces are NOT trimmed.
|
inlinestatic |
Spaces are trimmed.
Each input value is delimited by "|" on the first level, which represents a series of trees. An empty string represents an empty tree.
Each input value is delimited by "," on the second level, which represents the int value of a node in a tree.
|
inlinestatic |
Spaces are trimmed.
Each input value is delimited by "|" on the first level, which represents a series of trees.
Each input value is delimited by "," on the second level, which represents the int value of a node in a tree.
|
inlinestatic |
Each input value is delimited by "|" on the first level, which represents a series of sets.
Each input value is delimited by "," on the second level, which represents a int value in a set.
Spaces are NOT trimmed, since strings can contain start/end spaces.
|
inlinestatic |
Each input value is delimited by "|" on the first level, which represents a series of vector<int> objects. Spaces are trimmed, and an empty string represents an empty vector.
Each input value is delimited by "," on the second level, which represents a int value in a vector<int> object. Spaces are trimmed, and empty strings are ignored.
|
inlinestatic |
Each input value is delimited by "|" on the first level, which represents a series of vector<Interval> objects. Spaces are trimmed. An empty string represents an empty vectory.
Each input value is delimited by "," on the second level, which represents the paired int value of an Interval in a vector<Interval> object. Spaces are trimmed. Empty string is not allowed.
|
inlinestatic |
Each input value is delimited by "|" on the first level, which represents a series of vector<string> objects.
Each input value is delimited by "," on the second level, which represents a string in a vector<string> object.
Spaces are NOT trimmed.
|
inlinestatic |
Each input value is delimited by "|" on the first level, which represents a series of vector<vector<char> > objects. An empty string represents an empty vector.
Each input value is delimited by "," on the second level, which represents the values of a vector<char> object.
Spaces are NOT trimmed.
|
inlinestatic |
Remove spaces from the right side of input string.
|
inlinestatic |
Sort on both first and second levels.
|
inlinestatic |
Sort on both first and second levels.
|
inlinestatic |
Sort on both first and second levels.
|
inlinestatic |
Sort a vector of lists (made of ListNode).
|
inlinestatic |
Sort a vector of trees (made of TreeNode).
|
inlinestatic |
Sort a vector of trees (made of TreeLinkNode).
|
inlinestatic |
Sort a vector of Intervals.
First compare value of start, then compare value of end.
|
inlinestatic |
Sort a vector of vector of Intervals (on vector<Interval> level).
First compare value of start, then compare value of end.
|
inlinestatic |
Sort a vector of vector of int (on first level, i.e., vector<int> level).
|
inlinestatic |
Sort a vector of vector of int (on first level, i.e., vector<int> level).
|
inlinestatic |
Remove spaces from the left and right sides of input string.