-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
67 lines (54 loc) · 1.44 KB
/
main.cpp
File metadata and controls
67 lines (54 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#include <iostream>
#include <vector>
#include <map>
#include <unordered_map>
#include <queue>
#include <set>
#include <stack>
#include <unordered_set>
#include <cmath>
#include <algorithm>
#include <sstream>
using namespace std;
#define max(a,b) (a)>(b)?(a):(b)
#define min(a,b) (a)<(b)?(a):(b)
struct TreeNode {
int val;
TreeNode *left;
TreeNode *right;
TreeNode() : val(0), left(nullptr), right(nullptr) {}
TreeNode(int x) : val(x), left(NULL), right(NULL) {}
};
struct ListNode {
int val;
ListNode *next;
ListNode(int x, ListNode* nxt = NULL) : val(x), next(nxt) {}
};
class Node {
public:
int val;
Node* left;
Node* right;
Node* next;
Node() : val(0), left(NULL), right(NULL), next(NULL) {}
Node(int _val) : val(_val), left(NULL), right(NULL), next(NULL) {}
Node(int _val, Node* _left, Node* _right, Node* _next)
: val(_val), left(_left), right(_right), next(_next) {}
};
struct DlinkNode {
int key, value;
DlinkNode* prev, *next;
DlinkNode(): key(0), value(0), prev(nullptr), next(nullptr) {}
DlinkNode(int k, int v):key(k), value(v), prev(nullptr), next(nullptr) {}
};
int main() {
Solution* s = new Solution();
vector<int> arr1 = {2,3,2};
vector<int> arr2 = {5};
vector<vector<char>> g = {{'a'}, {'a'}};
vector<vector<int>> aa = {{1,3},{0,2},{1,3},{0,2}};
string str1 = "ab";
string str2 = "ba";
cout<<s->rob(arr1);
return 0;
}