-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCommentParser.cpp
107 lines (82 loc) · 2.28 KB
/
CommentParser.cpp
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
//<editor-fold desc="Template">
#include <bits/stdc++.h>
#include <experimental/>
using namespace std;
template<class ...Args>
auto &read(Args &...args) { return (cin >> ... >> args); }
#define READ(...) __VA_ARGS__; read(__VA_ARGS__)
#define mp(a, b)(make_pair(a,b))
#define pb(a) push_back(a)
#define FORE(i, a, b) for (int i = (a); i <= (b); ++i)
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define ROF(i, a, b) for (int i = (a); i >= (b); --i)
#define RF(i, a) ROF(i,a,0)
#define FR(i, a) FOR(i,0,a)
#define FRE(i, a) FORE(i,0,a)
#define fast ios::sync_with_stdio(0);cin.tie(0)
#define sz(x) ((int)(x.size()))
#define f first
#define s second
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define CASE(t) "Case #"<<(t)<<": "
using ll = long long;
using ull = unsigned long long;
using vi = vector<int>;
using vl = vector<ll>;
using vd = vector<double>;
using vvi = vector<vi>;
using vvd = vector<vd>;
using vvl = vector<vl>;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using pdd = pair<double, double>;
using vs = vector<string>;
using vb = vector<bool>;
using vvb = vector<vb>;
using vvs = vector<vs>;
using vpii = vector<pii>;
using vvpii = vector<vpii>;
using vvvi = vector<vvi>; //are you sure about this?
using vvvl = vector<vvl>; //are you sure about this?
ll MOD = 1000000007;
template<typename T>
void setmax(T &a, T b) { if (b > a) a = b; }
template<typename T>
void setmin(T &a, T b) { if (b < a) a = b; }
//</editor-fold>
//<editor-fold desc="Notes">
/*Insights
*/
/*Debugging
*/
/*Code Improvements
*/
// TAG:
/*
*/
//</editor-fold>
std::string get_file_contents(string filename){
std::ifstream in(filename, std::ios::in | std::ios::binary);
std::string contents;
in.seekg(0, std::ios::end);
contents.resize(in.tellg());
in.seekg(0, std::ios::beg);
in.read(&contents[0], contents.size());
in.close();
return(contents);
}
void add_files(vector<string>& paths,string path){
for (const auto & entry : filesystem::directory_iterator(path))
std::cout << entry.path() << std::endl;
}
int main() {
string test = get_file_contents("/Users/work/CLionProjects/UCF/CF/1705C.cpp");
cout<<test<<endl;
return 0;
}
/*
THINGS TO CHECK BEFORE SUBMITTING:
Corner cases? n=0,1?
Possible chance for overflow?
*/