-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhelper_methods.cpp
More file actions
executable file
·42 lines (34 loc) · 1.05 KB
/
Copy pathhelper_methods.cpp
File metadata and controls
executable file
·42 lines (34 loc) · 1.05 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
//============================================================================
// Name : helper_methods.cpp
// Author :
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <iostream>
#include <algorithm>
#include <vector>
#include <iostream>
#include <vector>
#include <sstream>
#include <string>
#include <iterator>
using namespace std;
int n, d[100000], e[100000], sol[1000000];
float f;
vector<int> via;
vector<string> vib;
//Helper Methods
void ReadIntLine(vector<int>& numbers) {// used to read entire line of ints into vector
string line;
getline(cin, line);
istringstream is(line);
numbers = vector<int>(istream_iterator<int>(is), istream_iterator<int>());
}
void ReadDoubleLine(vector<string>& numbers) {// used to read entire line of strings into vector
string line;
getline(cin, line);
istringstream is(line);
numbers = vector<string>(istream_iterator<string>(is),
istream_iterator<string>());
}