-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.cc
51 lines (42 loc) · 845 Bytes
/
template.cc
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
#include <algorithm>
#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include <queue>
#include <list>
#include <set>
#include <unordered_map>
#include <map>
#include <regex>
#include <string>
using namespace std;
#define ll long long
vector<string> split(string s);
vector<string> splitStr(string s, char ch);
int main() {
ifstream f {"day1.in"};
string s;
while (getline(f,s)) {
}
return 0;
}
vector<string> split(string s) {
stringstream ss(s);
string str;
vector<string> vec;
while (ss >> str) {
vec.push_back(str);
}
return vec;
}
vector<string> splitStr(string s, char ch) {
stringstream ss(s);
vector<string> vec;
while (ss.good()) {
string str;
getline(ss,str,ch);
vec.push_back(str);
}
return vec;
}